[mrtg] New Mrtg Server very high CPU usage.

Mersberger, Robert robert.mersberger at goldenliving.com
Tue Aug 12 15:24:55 CEST 2008

 Thanks for the input. I am currently doing some of what you suggested
and it has helped greatly.
I still run the same cron job but now read a directory that contains
only 6 different .cfg files.  these 6 files filed with include: only
statement that point back to all the actual device cfg flies. I don't
run as a daemon or use forks.  when my cron job runs it now runs 6 tasks
at a time where before the use of include cfg's we were trying to run
someplace in the neighborhood of 560 tasks and using 100% cpu.  Running
the current 6 tasks is show cpu usage of about 60% and task run time has
been good.

Thanks for all you input.

Final question: is possible to use Forks: with out running as a Daemon?

-----Original Message-----
From: mrtg-bounces at lists.oetiker.ch
[mailto:mrtg-bounces at lists.oetiker.ch] On Behalf Of Steve Shipway
Sent: Monday, August 11, 2008 10:35 PM
To: mrtg at lists.oetiker.ch
Subject: Re: [mrtg] New Mrtg Server very high CPU usage.

You might find it more efficient (on a UNIX server) to create a
master.cfg file that uses Include: to include each of the other files,
and Forks: to set a value depending on your servers power (try 20 for a
start and see if it completes in time) and then run MRTG in daemon mode.

RunAsDaemon: yes
Forks: 20
Include: file1.cfg
Include: file2.cfg
routers.cgi*Ignore: yes

(the last line is for if you use the routers2 frontend).  Its a shame
you can't (currently) use a wildcard in the Include: directive.

Once you have set this up, increase the Forks value if the polling cycle
take >4mins, and decrease it if your CPU and memory use get too high.
If both are the case, then get a bigger server and/or faster disks :)


mrtg mailing list
mrtg at lists.oetiker.ch

Please consider the environment before printing this e-mail.

This e-mail message and any attachment(s) (collectively, this 'Email') are intended
only for the confidential use of the recipient(s) named above. If the reader of this
message is not the intended recipient named above or an agent responsible for
delivering it to the intended recipient named above, you have received this Email in error.
Please notify the sender immediately and permanently delete this Email and any copies thereof.

More information about the mrtg mailing list