[mrtg] mrtg 14all speed

Pavel Ruzicka pavouk at pavouk.org
Fri Mar 19 22:43:32 CET 2010


Hello,

> -> 2. Use separated MRTG config files with Includes in main mrtg.cfg.
> 
> I'm currently not doing this but can easily do this.. Do you have a cfg
> file for each 'device'?

Yes, I have Include file per device.

> If so where do you put the WorkDir setting? Do
> you include this in each cfg or your main mrtg.cfg

I have Workdir and other global parameters in all cfg files, but it is not
too big overhead.

> What does your 14all.cgi call look like
> 
> site.net/cgi-bin/14all.cgi?log=switch.net.1&cfg=switch.cfg

I use this syntax:
site.net/mrtg-cgi/14all.cgi?log=switch.net_fastethernet0_4&cfg=switch.net.cfg

> -> There remains one thing, when kernel flush caches. In this situation are
> -> all accesses to the rrd files on filesystem blocked until cache is
>  flushed.
> 
> Unsure? I've only seen the rrd files in locked mode once..

MRTG usually runs about 1 minute, if all devices respond fastly and ends.
Next system doing nothing and after few seconds kernel begins flushing.
Now is everything totally dead when need access filesystem.
After flushing everything works normally to the next MRTG 5 minutes round...
I have two HT processors and fast 15000RPM disks in a raid, that flushing of
about 22000 RRD files on EXT3 filesystem runs about few seconds.
 
> Currently I automate the generation of cfg files per device and place
> them in mrtg/dev/switch.name.cfg
> 
> I then basically cat these all together into mrtg/switch.inc which I
> include in mrtg.cfg...
> 
> Aparently I'd get better luck with including mrtg/dev/* in the mrtg.cfg
> file.. but then how does this translate to the 14all config / cgi call?

I don't know. maybe create some symlinks? Or patch the 14all.cgi, but I usually
don't want to patch programs, because is harder to go to a new version.

Best regards,

Pavel Ruzicka



More information about the mrtg mailing list