[mrtg] MRTG not running by default after reboot - SOLVED

Joel Roberts Joel.Roberts at pinkardcc.com
Thu May 16 00:46:09 CEST 2013

That was it, was the time syntax. Working fine now, thank you.

Thank you,


From: Steve Shipway [mailto:s.shipway at auckland.ac.nz]
Sent: Wednesday, May 15, 2013 4:14 PM
To: Joel Roberts; 'mrtg at lists.oetiker.ch'
Subject: RE: MRTG not running by default after reboot

Does that time syntax work in your version of cron?  For some, you’d need to use

*/5 * * * * root [ -x /usr/bin/mrtg -a -r /etc/mrtg.cfg ] && env LANG=C /usr/bin/mrtg /etc/mrtg.cfg >> /var/log/mrtg/mrtg.log 2>&1

Or even…

0,5,10,15,20,25,30,35,40,45,50,55 * * * * root …..

Also check permissions etc on the file in cron.d to make sure it is actually being processed.  Try putting the definition (without the ‘root’ bit) directly in the root crontabs instead.


Steve Shipway
ITS Unix Services Design Lead
University of Auckland, New Zealand
Floor 1, 58 Symonds Street, Auckland
Phone: +64 (0)9 3737599 ext 86487
DDI: +64 (0)9 923 6487
Mobile: +64 (0)21 753 189
Email: s.shipway at auckland.ac.nz<mailto:s.shipway at auckland.ac.nz>
P Please consider the environment before printing this e-mail : 打印本邮件,将减少一棵树存活的机会

From: mrtg-bounces+s.shipway=auckland.ac.nz at lists.oetiker.ch<mailto:mrtg-bounces+s.shipway=auckland.ac.nz at lists.oetiker.ch> [mailto:mrtg-bounces+s.shipway=auckland.ac.nz at lists.oetiker.ch] On Behalf Of Joel Roberts
Sent: Thursday, 16 May 2013 8:53 a.m.
To: mrtg at lists.oetiker.ch<mailto:mrtg at lists.oetiker.ch>
Subject: [mrtg] MRTG not running by default after reboot

Just did a new install of mrtg, been a while since I’d done one so jumped through some hoops to get the index pages just the way I wanted them, but now when rebooting the server (Debian Linux 6), mrtg doesn’t run on its own, I have to execute:

env LANG=C /usr/bin/mrtg /etc/mrtg.cfg

from the terminal to get it to start graphing again. I checked in /etc/cron.d, the mrtg file is there with the following entry:

0-55/5 * * * * root if [ -x /usr/bin/mrtg ] && [ -r /etc/mrtg.cfg ]; then env LANG=C /usr/bin/mrtg /etc/mrtg.cfg >> /var/log/mrtg/mrtg.log 2>&1; fi

The log file listed in the cron job hasn’t been updated in 2 days either, even after manually starting mrtg. Any help in getting it to run automatically would be greatly appreciated.

Thanks in advance,


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/mrtg/attachments/20130515/745719c6/attachment-0001.htm 

More information about the mrtg mailing list