Default mrtg cron won't execute: [root@marte cron.d]# cat /etc/cron.d/mrtg */5 * * * * root /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock- file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok # mrtg /etc/mrtg/mrtg.cfg ----------------------------------------------------------------------- ERROR: Mrtg will most likely not work properly when the environment variable LANG is set to UTF-8. Please run mrtg in an environment where this is not the case. Try the following command to start: env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg ----------------------------------------------------------------------- Even when running manually with env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock- file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok it doesn't create any files in /var/www/mrtg strace shows, among others, open("/usr/lib/perl5/site_perl/5.8.2/Socket6.pm", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) == From: Alan Cox <alan> To: For testers of Fedora Core development releases <fedora-test-list> Subject: Re: fc3t2: mrtg doesn't run? On Thu, Sep 30, 2004 at 10:20:22AM -0300, Alexandre Strube wrote: > Em Qui, 2004-09-30 Ã s 09:43, Alan Cox escreveu: > > Ughhh. That sounds like an opportunity to make some free space on the CD-ROM's > > :-) > > What other monitoring proggie would you recomend? I hate when my > neighbours begin to use my connection to download big stuff, and this > helps me a lot. No opinion there, but we shouldn't be leaving non unicode capable stuff in the base distro IMHO
The Socket6 module is not required for mrtg operation. From cron this works fine for me (cron clears the environment), both with strict and targeted SELinux policy. Likewise with LANG=C from the command line. (Note that the SELinux policies assume usage of the /var/lib/mrtg and /var/lock/mrtg directories, like in the default cron entry and default config file.) Please paste as a comment the output of the commands (rpm -q mrtg vixie-cron perl perl-URI) (rpm -q selinux-policy-{targeted,strict}) Also please attach your files /etc/sysconfig/selinux and /etc/mrtg/mrtg.conf. Thanks in advance.
It's the first time I use mrtg, I expected to find files in /var/www/mrtg, but I wasn't sure so I asked the mailing list. mrtg-2.10.15-1 vixie-cron-4.1-11 perl-5.8.5-4 perl-URI-1.30-1 selinux-policy-targeted-1.17.16-2 selinux-policy-strict-1.17.16-2 SELinux is disabled. Attaching config files.
Created attachment 104616 [details] /etc/selinux/config
Created attachment 104617 [details] /etc/mrtg/mrtg.cfg
mrtg creates output files only for defined targets, the config file defines no targets, so mrtg creates no files. A minimal example of a target is commented out in the config file; you can use cfgmaker to create a larger example for SNMP-capable devices.