[mrtg] Re: A Question

Justin Shore listuser at vinnie.ksu.ksu.edu
Sat Mar 11 09:54:04 MET 2000


I'm doing a little MRTG contract work for an ISP o mine.  I'm setting 
it up to monitor 47 seperate targets (12 different configs for 
everything for terminal servers to disk usage, mail stats to network 
I/O, DNS stats to DSL stats and back again).  The powers that be at 
this ISP had me put it on a little P75 that also acts as a firewall 
for a few users.  I've seperated the scripts to run at different 
times.  Even with that in place the load still gets rather high at 
times.  The highest its gotten is 9.34 with no users connected (only 
two people actualy have accounts and I'm one of them--the other can't 
remember his passwd).

http://ipgate.sktc.net/stats/load_head

There is a way of cutting that load down considerably.  I personally 
don't like this method since I like more control over my scripts but 
it would work.  First off, I created a simple shell script to lauch 
MRTG for each of my configs (full paths and all).  I use the naming 
scheme "get-" and appended the name of my config before the .cfg 
(this works well since most of my configs are the names of towns).  I 
setup another shell script to load all the other scripts one by one 
(I use this whenever I do a massive update to the configs--like when 
I change one of my menus).

get-something;
get-something-else;
get-some-more
get-blah;

You get the point.

By doing it that way, it waits until the first script exits before it 
proceeds to the next.  It may take a full five minutes to complete 
for some users but it would keep the load down.  If it takes too 
terribly long (i.e. it starts over lapping your runs), break it up 
into 2-3 scripts to get it done sooner.  Like I said before, I don't 
like that method.  I don't even use it but it would work.

HTH
   Justin

At 11:52 AM -0600 3/10/00, Jack Barnett wrote:
>crontab -l
>
>0,5,10,15,20,25,30,35,40,45,50,55 * * * * /home/bud/public_html/1/go
>1,6,11,16,21,26,31,36,41,46,51,56 * * * * /home/bud/public_html/2/go
>2,7,12,17,22,27,32,37,42,47,52,57 * * * * /home/bud/public_html/3/go
>3,8,13,18,23,28,33,38,43,48,53,58 * * * * /home/bud/public_html/4/go
>
>We only monitor 4 interfaces (but it is a really slow machine), and if we do
>them all at the same exact time it would really put a hurting on the
>machine.  This way, we give each interface 60 seconds to get done what it
>has to do before running the next one.  Sometimes they over lap if the
>system is really busy, but it doesn't affect it to much.
>
>`go` is just a #!/bin/sh script that executes the mrtg with the right config
>file, here you could have go execute 25-50 differant sessions for mrtg for
>your differant interfaces, then a minute later execute another 25-50
>Differant interfaces.
>
>Or you could try running mrtg under the `nice` command, it won't use all
>it's horse power to process mrtg requests, but would have enegry to do other
>things like email/web/etc..
>

-- 

--
Justin Shore
K-State Linux Distro Mirror, Sysadmin
macdaddy at vinnie.ksu.ksu.edu
<http://vinnie.ksu.ksu.edu/mirror/rpm2html>
<ftp://vinnie.ksu.ksu.edu/pub/mirror/linux>

*Internet2 Users*
<ftp://quest.ksu.ksu.edu/pub/mirror/linux>

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:mrtg-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/mrtg



More information about the mrtg mailing list