LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Problems using cron (https://www.linuxquestions.org/questions/linux-software-2/problems-using-cron-4175584407/)

thomazp 07-12-2016 09:31 AM

Problems using cron
 
Hi people,
I am installing mrtg, and now I am configuring it.
I could run the cmd using cmd line, but when trying to do using cron (each 5 minutes) the command doesn't run and the debug file is becoming full with syntax /bin/sh file not found.
How can I assure the error is there and is it possible reinstall cron using yum command?
Thanks

TB0ne 07-12-2016 09:39 AM

Quote:

Originally Posted by thomazp (Post 5574603)
Hi people,
I am installing mrtg, and now I am configuring it.
I could run the cmd using cmd line, but when trying to do using cron (each 5 minutes) the command doesn't run and the debug file is becoming full with syntax /bin/sh file not found.
How can I assure the error is there and is it possible reinstall cron using yum command?

STOP opening new threads. Your problem is NOT WITH CRON as you've been told in your other FOUR THREADS about getting mrtg to work.

You have been handed the correct command, but are not using it. You don't need to re-install cron...you need to give it the right command. Until you do, it won't work, period. See your other threads about this same issue. We can't keep explaining it further. The command you posted WILL NOT WORK from the command line when you type it in...it doesn't work on ANY of my systems, and won't work on yours either.

AGAIN...READ the MRTG documentation....USE THE VERY CLEAR EXAMPLE CRON JOB IN IT. That's all you need to do.

thomazp 07-12-2016 10:00 AM

Which command?
It's the first time you're saying that.

TB0ne 07-12-2016 10:08 AM

Quote:

Originally Posted by thomazp (Post 5574624)
Which command? It's the first time you're saying that.

You're either a liar or you're stupid. There's no other explanation for you posting this.

You've been handed the command in ALL of your other mrtg threads, been pointed to it in the documentation multiple times by multiple users, and REFUSE TO UNDERSTAND IT. To put it as simply as we can, in the hopes that you will FINALLY get it through your skull:
  • Go to the MRTG documentation. The link should be easy for you to find if you look at the MANY times you've been handed it in your MRTG threads. If that's too hard, try putting "how to install mrtg in linux" into Google, and click on the VERY FIRST LINK.
  • Scroll down to the VERY BOTTOM
  • Now, read the words on the screen. Pay attention to the part that says "if you live in Linux land".
  • The part in the box is the command.
  • Put in your paths, where the example says to.

Emerson 07-12-2016 10:43 AM

Should I get some popcorn? :p

thomazp 07-12-2016 10:44 AM

Be My guest.
TBone: I say Orange and You reply bananas.

thomazp 07-12-2016 12:07 PM

The mrtg.log isn't present, because the mrtg didn't run.
I guess the cmd I put in cron is w/ wrong syntax.
I put:
Export LANG=C /usr/bin/mrtg <path>/arq.cfg --logging /var/log/<log file> >> /tmp/debug.log 2>&1

TB0ne 07-12-2016 12:09 PM

Quote:

Originally Posted by thomazp (Post 5574654)
Be My guest.
TBone: I say Orange and You reply bananas.

Sorry, have no idea what you're talking about, and it's doubtful you know either. If you honestly can't read ONE PAGE of simple instructions, or type in ONE COMMAND correctly, there is NOTHING, that ANYONE, ANYWHERE can do to help you. You're getting paid to do a job that apparently you're not qualified to do. Your only two choices are:
  1. Quit
  2. Learn
You're not learning, despite being given VERY clear instructions.
Quote:

Originally Posted by thomazp
The mrtg.log isn't present, because the mrtg didn't run. I guess the cmd I put in cron is w/ wrong syntax.
I put: Export LANG=C /usr/bin/mrtg <path>/arq.cfg --logging /var/log/<log file> >> /tmp/debug.log 2>&1

You GUESS??? Despite being told about a dozen times, over five threads, that your syntax was completely wrong, and despite being HANDED and SPOON-FED the correct one from the documentation at least half a dozen times? And you GUESS???

AGAIN...you CANNOT put the export....crap in front of the command. AGAIN, you have to actually put a PATH to the cfg file. AGAIN, the MRTG documentation has a CLEAR EXAMPLE of what to do.

TB0ne 07-12-2016 12:11 PM

Quote:

Originally Posted by Emerson (Post 5574653)
Should I get some popcorn? :p

Feel free...I'm done with this guy. Five threads open about installing MRTG...which only has one page of instructions with examples, and he STILL can't figure it out. The sad part? He's getting PAID by someone to do this.

Emerson 07-12-2016 12:47 PM

Yeah ... to be a success in Linux one has to pay attention. To pay attention to responses from OS and apps. To pay attention to what other people have done. Dig into details. People with attention disorders will have extreme difficulties.

thomazp 07-12-2016 12:57 PM

Thanks Emerson,
Can you help me with this ?
The mrtg was installed using yum, and I can run using command line, and even inserting the command in cron, it doesn't run, and the log says: invalid Syntax.
Thanks

TB0ne 07-12-2016 12:59 PM

Quote:

Originally Posted by thomazp (Post 5574766)
Thanks Emerson,
Can you help me with this ?
The mrtg was installed using yum, and I can run using command line, and even inserting the command in cron, it doesn't run, and the log says: invalid Syntax.
Thanks

Good luck, Emerson...nothing anyone else has said about "you're not putting the right command in, do it like this..." has sunk in. See this post before wasting your breath:
http://www.linuxquestions.org/questi...3/#post5574620

jeremy 07-12-2016 01:18 PM

thomazp, you seem to be spreading your question among multiple threads which is discouraged here at LQ as it results in the issue being very difficult to track for other members. You also seem to have a habit of clicking "Report" instead of "Reply", which is likely causing some confusion on both sides. You may want to read http://www.linuxquestions.org/questi...#faq_lqwelcome. If you have any questions, don't hesitate to contact me.

--jeremy


All times are GMT -5. The time now is 01:39 AM.