[mrtg] Re: Newbie Question
Dave Williams
dave_williams at eli.net
Mon Apr 2 18:37:56 MEST 2001
I'm pretty new to this too but perhaps I can help. You might not want your MRTG
server host to process 60 to 80 targets every 5 minutes. I have an old dual
100Mhz Pentium processor running RedHat 7.0 Linux as my MRTG server. When I had
a lot of targets processing out of one MRTG cfg file the utilization on both
processors ran 100% for two minutes, followed by 3 minutes of idle usage. So I
split my targets up into multiple MRTG cfg files, specifically collecting
information in each cfg file that seemed reasonable to present on a single html
page (using IndexMaker). Know when I run the TOP processer utilization program
I run 100% for about 25 seconds out each minute. My cron file looks like this:
*/5 * * * * /mrtg-path/mrtg /mrtg-scripts/mrtgcfg1.cfg (replace mrtg-path &
scripts as needed)
*/5 * * * * /mrtg-path/mrtg /mrtg-scripts/mrtgcfg2.cfg (second file in same
0,5,10... minute period)
1-60/5 * * * * /mrtg-path/mrtg /mrtg-scripts/mrtgcfg3.cfg (first file in
1,6,11... minute period)
1-60/5 * * * * /mrtg-path/mrtg /mrtg-scripts/mrtgcfg4.cfg (2nd file in 1,6,11...
minute period)
2-60/5 * * * * /mrtg-path/mrtg /mrtg-scripts/mrtgcfg5.cfg (3rd file in 2,7,12...
minute period)
and so on,
4-60/5 * * * * /mrtg-path/mrtg /mrtg-scripts/mrtgcfgn.cfg (last file in
4,9,14... minute period)
The cfg files were generated with multiple statements:
public at router1.cfg \
public at router2.cfg \
and so on,
public at routern.cfg
I also used a global cfgmaker option:
--global 'Forks:8'
This allows multiple MRTG process invocations to occur. This technique is
monitoring 45 routers plus 15 large ethernet switches so it should scale to your
size.
hope this helps!
Patrick Bartkus wrote:
> Here is an example:
>
> My crontab:
> ---
> 7,12,17,22,27,32,37,42,47,52,57 * * * * /usr/local/mrtguser/bin/switches.ksh
> ---
>
> Then switches.ksh shows:
> ---
> #!/usr/bin/ksh
> #
> # s w i t c h e s . k s h
> #
> # This script will execute the
> # mrtg querys for MKE and PVD Switches
> #
> /usr/local/mrtg-2/bin/mrtg /files0/httpd/htdocs/mrtg/mke/switches.cfg
> /usr/local/mrtg-2/bin/mrtg /files0/httpd/htdocs/mrtg/pvd/switches.cfg
> ---
>
> Then the location's cfg file brings together each switches's cfg:
> ---
> cat /files0/httpd/htdocs/mrtg/mke/switches.cfg
>
> # This includes all the Columbia cfg files
> #
> Include: /files0/httpd/htdocs/mrtg/mke/globals.inc
> #
> # Include the capps file
> Include:/files0/httpd/htdocs/mrtg/mke/capps.cfg
> #
> # Include the donner file
> Include:/files0/httpd/htdocs/mrtg/mke/donner.cfg
> #
> # Include the sangay file
> Include:/files0/httpd/htdocs/mrtg/mke/sangay.cfg
> #
> # Include the firedrake file
> Include:/files0/httpd/htdocs/mrtg/mke/firedrake.cfg
> #
> # Include the gillette file
> Include:/files0/httpd/htdocs/mrtg/mke/gillette.cfg
> #
> # Include the hanna file
> Include:/files0/httpd/htdocs/mrtg/mke/hanna.cfg
> #
> # Include the kellar file
> Include:/files0/httpd/htdocs/mrtg/mke/kellar.cfg
> #
> ---
>
> Then the globals.inc file is:
> ---
> cat /files0/httpd/htdocs/mrtg/mke/globals.inc
> # Global Includes
> WorkDir: /files0/httpd/htdocs/mrtg
> Options[_]: bits,growright
>
> IconDir: /mrtg/
>
> LogFormat: rrdtool
> PathAdd: /usr/local/rrdtool/bin/
> LibAdd: /usr/local/rrdtool/lib/perl
> Refresh: 300
> ---
>
> Then each switch .cfg has the uplink ports I am interested in...
>
> Enjoy!
> Patrick
> ---
> Patrick Bartkus, CCNP Certified Sr. Network Support Analyst
> Fleet Mortgage Group Columbia, SC
> If truth was not absolute, how could there be justice?
>
> >From: "Nabil Fares" <fares.nabil at epa.gov>
> >To: "MRTG" <mrtg at list.ee.ethz.ch>
> >Subject: [mrtg] Newbie Question
> >Date: Mon, 2 Apr 2001 09:35:30 -0400
> >
> >
> >Greetings all,
> >
> >Hope all had good weekend!
> >
> >I've about 60-80 config files for our routers, I'm trying to find a way to
> >have one crontab instance instead of 80 different jobs. Someone previously
> >mentioned something about the "include" statement, can you guys provide me
> >with some examples?
> >
> >Thanks,
> >
> >Nabil
> >
> >
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com
>
> --
> 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
-- Attached file removed by Listar and put at URL below --
-- Type: text/x-vcard
-- Desc: Card for Dave Williams
-- Size: 325 bytes
-- URL : http://www.ee.ethz.ch/~slist/pantomime/07-dave_williams.vcf
--
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