[mrtg] Re: Starting MRTG - There has to be a better way...
Jerry Heidtke
jheidtke at fmlh.edu
Fri Jul 25 13:47:43 MEST 2003
There are several better ways.
I monitor close to a thousand devices with mrtg from one W2K server
(just checked, I've got 7,394 active rrd files). I'm running a cron
service, which each minute launches from three to five instances of
mrtg.
One instance from the cron file might look like this (beware of wrapped
line:
2,7,12,17,22,27,32,37,42,47,52,57 * * * * d:\perl\bin\wperl
d:\mrtg\bin\mrtg --logging d:\mrtgcfg\logs\Cisco2950a.err --lock-file
d:\mrtgcfg\locks\Cisco2950a.lok --confcache-file
d:\mrtgcfg\ok\Cisco2950a.ok d:\mrtgcfg\cfg\Cisco2950a.cfg
Each instance of mrtg has a "master" config file that looks like this:
Include: d:\mrtgcfg\cfg\global-options.cfg
LogDir: d:\mrtgdata\network\Cisco2950
Include: d:\mrtgcfg\cfg\network\1044-2950-47-194.cfg
Include: d:\mrtgcfg\cfg\network\1AS-2950-47-195.cfg
... (up to 40 or so individual device config files listed)
I try to include only as many individual device config files in each
"master" config file so that if one or two of the devices are
unreachable, which causes mrtg to retry each query until it times out,
the instance will still finish in less than the five minute cyle. If all
devices are reachable, all the instances launched at any one time will
usually finish within 15-20 seconds. Memory used by all the instances
never exceeds 50MB, and average CPU utilization on the box runs about
25%, even though it spikes to 100% while mrtg is running.
Works well. There's other ways to solve this, including using the
Windows scheduler, multiple instances of mrtg (with "master" config
files as above) with RunAsDaemon: Yes, and other schedulers that run as
services on Windows. I'm sure other people will describe their favorite
methods. I've found my method to be easy to maintain and very reliable.
Jerry
-----Original Message-----
From: Cornwell, Eric J. [mailto:EJCORNWELL at coopertire.com]
Sent: Friday, July 25, 2003 6:25 AM
To: mrtg at list.ee.ethz.ch
Subject: [mrtg] Starting MRTG - There has to be a better way...
Hello Everyone!
We currently monitor close to 100 devices with one Windows 2K PC. Each
device has its own config file. I have a bat file that runs and starts
each
config the following way.
-----------------------------------------------------------------------
start /B wperl mrtg (RouterName).cfg --logging MRTG_Routers.log
echo (RouterName) has been started.
sleep 7
-----------------------------------------------------------------------
Each device is offset by 7 seconds to help spread everything out. My
problem is that with 100 wperl.exe processes running they eat up all the
available memory. Is there a better way to start MRTG than this or am I
just going to have to live with it?
Thanks!
Eric
--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive http://www.ee.ethz.ch/~slist/mrtg
FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
Confidentiality Notice: This e-mail message, including any attachments,
is for the sole use of the intended recipient(s) and may contain
confidential and privileged information. Any unauthorized review, use,
disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply e-mail and destroy all
copies of the original message.
--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive http://www.ee.ethz.ch/~slist/mrtg
FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the mrtg
mailing list