LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Is the command in the contrab running? (https://www.linuxquestions.org/questions/linux-networking-3/is-the-command-in-the-contrab-running-4175584353/)

TB0ne 07-13-2016 02:42 PM

Quote:

Originally Posted by thomazp (Post 5575432)
Hi,
I installed a sw to analyze my routers.
I put in the cron to run every 5 minutes.
I put this way:
*/5 * * * * <dir>/cmd <option> --logging /var/log/logfile .
But it runs only if I type it in cmd line, but I know cron is running.
Can an someone tells me what to do?
Thanks

If after FIVE THREADS here, you still aren't understanding things, we will AGAIN reiterate that there is NOTHING ANYONE HERE can do to help you. Again, you are NOT communicating clearly, asking a clear question, or providing details. You keep changing the story, won't answer questions, and ignore what you're told, then you get nasty and sarcastic.

You're back to "installed a sw"...what is "sw"??? Because if that's text-speak for "software", you need to not only NOT use text-speak, but tell us WHAT software. Since you've been flailing at MRTG for a good while now, we can ASSUME that's what it is. If so, we will YET AGAIN tell you to read the VERY SIMPLE documentation on their website, that you've been spoon-fed now at least half a dozen times. It's one page. With examples...if you can't follow that, then you need to get someone else to do this.

No point in telling you anything else...you won't listen. There is also no point in you posting yet more threads/follow-ups begging for help, since you either won't follow the advice given, or you're incapable of actually understanding it.

thomazp 07-13-2016 03:42 PM

I noticed What was going wrong:
The cmd is:
mrtg <Loc>/mrtg file.cfg --logging <file>
And I was putting that way in cron.
I created a script, changed to execute , and replaced to this file instead of cmd+ location .
Now the cron is:
*/5 * * * * <script> --logging <path>/mrtg.log , and restarted cron, but didn't work.

Emerson 07-13-2016 03:50 PM

I haven't read all six threads, so maybe it was mentioned already. There are two ways to set up a cronjob, by running crontab -e as root or by editing /etc/crontab - which is system crontab with different syntax. I personally do not use root crontab for anything, it is empty. User jobs go to their respective crontabs indeed.

thomazp 07-13-2016 06:14 PM

My problem is putting to run on the cron.
I can run by cmd line, but putting in the cron, doesn't run.
Question: The .cfg file (generated by cfgmaker) can be in other location than mrtg?
I put <path1>/mrtg <path2>/file.cfg
In the cron writing */5 * * * * to run each 5 minutes.
I created a script with the content:
<path1>/mrtg <path2>/file.cfg
With the name filetest ,
Changed the attributes to filetest be executable.
Fill the cron that way:
*/5 * * * * filetest --logging /tmp/file.log
Restarted cron, but didn't run.
If I Type mrtg <path2>/file.cfg , it runs.
What is wrong?
Thanks

thomazp 07-14-2016 09:48 AM

Moved to Linux - General section.
Continue there please.
Thanks

Habitual 07-14-2016 12:53 PM

Restarting cron after making changes was so, 10+ years ago?


All times are GMT -5. The time now is 10:48 PM.