LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-13-2016, 03:42 PM   #31
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,454

Rep: Reputation: 7930Reputation: 7930Reputation: 7930Reputation: 7930Reputation: 7930Reputation: 7930Reputation: 7930Reputation: 7930Reputation: 7930Reputation: 7930Reputation: 7930

Quote:
Originally Posted by thomazp View Post
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.
 
Old 07-13-2016, 04:42 PM   #32
thomazp
Member
 
Registered: Dec 2015
Location: Brazil
Distribution: Ubuntu, Fedora
Posts: 161

Original Poster
Rep: Reputation: Disabled
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.

Last edited by thomazp; 07-13-2016 at 05:06 PM.
 
Old 07-13-2016, 04:50 PM   #33
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
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.
 
1 members found this post helpful.
Old 07-13-2016, 07:14 PM   #34
thomazp
Member
 
Registered: Dec 2015
Location: Brazil
Distribution: Ubuntu, Fedora
Posts: 161

Original Poster
Rep: Reputation: Disabled
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
 
Old 07-14-2016, 10:48 AM   #35
thomazp
Member
 
Registered: Dec 2015
Location: Brazil
Distribution: Ubuntu, Fedora
Posts: 161

Original Poster
Rep: Reputation: Disabled
Moved to Linux - General section.
Continue there please.
Thanks
 
Old 07-14-2016, 01:53 PM   #36
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Restarting cron after making changes was so, 10+ years ago?
 
  


Reply

Tags
crontab, mrtg


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
warning: at daemon not running mcaywood Linux - Newbie 2 11-15-2007 03:03 PM
at daemon not running mcaywood Linux - Newbie 3 10-17-2007 03:40 PM
Contrab schedule question? richikiki Slackware 1 07-15-2006 10:40 AM
rcpowersaved daemon is not running iskiri SUSE / openSUSE 1 01-04-2006 02:58 PM
Running in daemon mode socks Slackware 1 10-15-2004 09:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration