[mrtg] How to Daemonize

Michele Ferritto m.ferritto at gmail.com
Wed Aug 27 12:02:03 CEST 2008


Hello All,

First of all, a very big thank is dued for the whole job.... :)

Now the issue (I've searched through the archive but nothing to do):

I've mrtg 2.15.1 and rrd tool 1.3.0 on a virtualized  FC8 system.
I use "LogFormat: rrdtool" and router2cgi to read and draw the WAN
throughput of several cisco routers.

All works fine (very fine) but because the devices will become a lot,
I'm very interested to use the RunAsDaemon feature of mrtg to save CPU
clock and other resources.

I've tried two solutions:

1) on the mrtg startup scripts I've inserted a
"CONFIG="/etc/mrtg/*.cfg" to "catch" all the cfg files.
 If I do a "ps aux | grep mrtg" I see one single mrtg instance that
(it seems) processes all the files.

2) I've create a master cfg files with "Include" directive and then
modified the above  variable with "CONFIG="/etc/mrtg/master.cfg"
As per the first solution I see the same "ps" output.

The result is the same in both cases, only the first cfg file loaded
is truly processed, the others rrd files remains untouched and nothing
is draw...

Is there any workaround/solution?

Thanks in advance.

-- 

Michele Ferritto
Senior IT Engineer
R.L.U. #342460



More information about the mrtg mailing list