[mrtg] Re: More than one mrtg machine?

Perry, Duane PerryD at missouri.edu
Thu Jan 4 16:15:02 MET 2001


-----Original Message-----
From: Peter Baumann [mailto:Peter.Baumann at commcare.ch]
Sent: Thursday, January 04, 2001 1:43 AM
To: mrtg at list.ee.ethz.ch; pwilliamson at MANDTBANK.COM; PerryD at missouri.edu
Subject: [mrtg] Re: More than one mrtg machine?

> One additional note, I use five shell scripts to run a portion of my
configs
> each minute to spread out the load.
> Duane Perry
> University of Missouri

Are you willing to share your scripts ??

Peter
______________________________________________________


I had to laugh when I read this, I am near zero in scripting skills but
these are so simple even I can manipulate them.  Someone else built these so
I can take no credit. Here are the entries I have in crontab to schedule
each shell script:

#
0-55/5 * * * * /root/test1.sh
1-56/5 * * * * /root/test2.sh
2-57/5 * * * * /root/test3.sh
3-58/5 * * * * /root/test4.sh
4-59/5 * * * * /root/test5.sh

This cyles through running one each minute.

Here is one of the shell scripts. 


#!/bin/sh

# -----> START (2)
#
# routers
#
/usr/local/mrtg/run/mrtg /usr/local/cfg/vandiver1.cfg 1> /dev/null 2>
/dev/null
/usr/local/mrtg/run/mrtg /usr/local/cfg/cvmannexr1.cfg 1> /dev/null 2>
/dev/null
#
# 1200 Accelar switches
#
/usr/local/mrtg/run/mrtg /usr/local/cfg/taa6.cfg 1> /dev/null 2> /dev/null
#
# MLT trunks
#
/usr/local/mrtg/run/mrtg /usr/local/cfg/publink.cfg 1> /dev/null 2>
/dev/null
/usr/local/mrtg/run/mrtg /usr/local/cfg/netlink.cfg 1> /dev/null 2>
/dev/null
/usr/local/mrtg/run/mrtg /usr/local/cfg/seclink.cfg 1> /dev/null 2>
/dev/null
#
# 450 switches
#
/usr/local/mrtg/run/mrtg /usr/local/cfg/locust450_241.cfg 1> /dev/null 2>
/dev/null
/usr/local/mrtg/run/mrtg /usr/local/cfg/locust450_242.cfg 1> /dev/null 2>
/dev/null
/usr/local/mrtg/run/mrtg /usr/local/cfg/locust350_243.cfg 1> /dev/null 2>
/dev/null
/usr/local/mrtg/run/mrtg /usr/local/cfg/locust450_244.cfg 1> /dev/null 2>
/dev/null
/usr/local/mrtg/run/mrtg /usr/local/cfg/locust450_245.cfg 1> /dev/null 2>
/dev/null
#
# -----| END   (2)


I build individual cfg files for each machine or function and add a line to
one of the scripts.  I get a report on the CPU time used by each script (I
am not sure how that works) and move them around to balance the load.

Duane Perry


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