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: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Steve Shipway
Sent: Monday, August 11, 2008 10:35 PM
To: [email protected]
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.
EG:

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 :)

Steve

_______________________________________________
mrtg mailing list
[email protected]
https://lists.oetiker.ch/cgi-bin/listinfo/mrtg


Please consider the environment before printing this e-mail.

CONFIDENTIAL NOTICE:
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.

_______________________________________________
mrtg mailing list
[email protected]
https://lists.oetiker.ch/cgi-bin/listinfo/mrtg

Reply via email to