[mrtg] Re: mrtg-rrd and big setup

Chuck.Coker at rcc.edu Chuck.Coker at rcc.edu
Wed May 18 00:18:31 MEST 2005


Valton,

I had similar problems with MRTG starting a polling cycle and taking so
long to finish that cron started the next polling cycle before the first
one had finished.

One of the things that worked well for me was to break my big mrtg.cfg
file into five smaller files: mrtg1.cfg, mrtg2.cfg, mrtg3.cfg,
mrtg4.cfg, and mrtg5.cfg.

Then I set up my crontab like this (five lines total, email wraps the
lines):
1,6,11,16,21,26,31,36,41,46,51,56 * * * * root
/usr/local/mrtg-2/bin/mrtg /usr/local/mrtg-2/bin/mrtg1.cfg --logging
/var/log/mrtg1.log
2,7,12,17,22,27,32,37,42,47,52,57 * * * * root
/usr/local/mrtg-2/bin/mrtg /usr/local/mrtg-2/bin/mrtg2.cfg --logging
/var/log/mrtg2.log
3,8,13,18,23,28,33,38,43,48,53,58 * * * * root
/usr/local/mrtg-2/bin/mrtg /usr/local/mrtg-2/bin/mrtg3.cfg --logging
/var/log/mrtg3.log
4,9,14,19,24,29,34,39,44,49,54,59 * * * * root
/usr/local/mrtg-2/bin/mrtg /usr/local/mrtg-2/bin/mrtg4.cfg --logging
/var/log/mrtg4.log
5,10,15,20,25,30,35,40,45,50,55,0 * * * * root
/usr/local/mrtg-2/bin/mrtg /usr/local/mrtg-2/bin/mrtg5.cfg --logging
/var/log/mrtg5.log

That solved my overlapping polling cycles problem.

Of all the changes I made to try to make my underpowered box run right,
this made the biggest difference. Your mileage may vary.

----------------------------------------------------------------
Chuck Coker                             chuck.coker (et) rcc.edu
       Riverside Community College, Information Services
4800 Magnolia Avenue, Riverside, California 92506, United States
+1 951 222 8759 (desk)                    +1 951 830 8068 (cell)
----------------------------------------------------------------

-----Original Message-----
From: Valton Hashani [mailto:valton at ipko.net] 
Sent: Monday, May 16, 2005 03:16 PM
To: mrtg at list.ee.ethz.ch
Subject: [mrtg] mrtg-rrd and big setup

Greetings all,
 If  you could give me any idea on this I would appreciate it.
First I would like to explain the setup of mrtg-rrd in our network.
First it
came the idea for each host (router) to create a graph that displays its
traffic statistics. Than I wrote a php script which automatically
creates
cfg files based on a selected interface for each host based on host id
(directory[host_id]: host_id). So there was a cfg file for each host.
For
creating graphs I used simple bash script
#!/bin/bash
for n in `ls /var/www/html/mrtg/*.cfg`
do
    mrtg $n
done
exit 0
which cron executed every 5 minutes,
but mrtg started to step itself on tail when number of hosts increased.
I tried forking mrtg process putting all cfgs in one cfg but that didn't
solve the problem.
The idea to execute each cfg at a time was not to create additional
snmp
traffic.

What bothered me was that cpu load was always 90-98%. Now the number of
hosts is around 1000 and the number of mrtg processes is increasing,
which
makes server where mrtg is installed, very hard to log in, also I have
to
wait minutes until the page with graphs is displayed (used 14all.cgi). I
did
some tweaking and tunning reorganizing and grouping of mrtg procesess
but
that is a temporary solution.
I am getting all the time HIGH CPU LOAD.
Machine is P4 with CPU  2.04 Ghz cache 1024KB  and 512MB RAM module.
Is there another way for  graphing traffic using SNMP?

Thank you in advance,
Valton

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://lists.ee.ethz.ch/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the mrtg mailing list