[mrtg] Re: How do you make MRTG run faster?

Robin Burger robin.burger at bms.com
Thu Oct 21 22:59:39 MEST 1999


If you check in your config directory you should see lock files (.cfg_l) when your
script starts from cron, this indicates that MRTG is running the specific  cfg
file that is associated with that instance

# ls -l cat5500-3b1*
-rw-r--r--   1 root     other     103406 Oct 20 17:58 cat5500-3b1.cfg
-rw-r--r--   2 root     other          0 Oct 21 16:40 cat5500-3b1.cfg_l
-rw-r--r--   2 root     other          0 Oct 21 16:40 cat5500-3b1.cfg_l_2356
-rw-r--r--   1 root     other       5711 Oct 21 16:40 cat5500-3b1.ok


The lock files (.cfg_l)  that I have take 20 minuets before they go away... i.e.
if I try to run MRTG on that locked  file (.cfg_l) before it is gone (20 minuets),
it will give me an error.

(( while in the config directory ))

while true
do
echo `date` " " `ls -l *.cfg_l | wc -l`
sleep 60
done

Thu Oct 21 16:30:48 EDT 1999   8
Thu Oct 21 16:31:48 EDT 1999   4
Thu Oct 21 16:32:48 EDT 1999   1
*.cfg_l: No such file or directory
Thu Oct 21 16:33:48 EDT 1999   0

(( ^c to get out of the loop ))


Since I run all of my processes in parallel by putting them in the background,
that means that I have 29 seperate instances running of MRTG at once.  If you do
''not'' use the '&' at the end then you are running them sequentially.  Is it bad
to do it the way that you are?  No, not if they finish in time.  Since I have a
large number targets and plan to monitor even more, it is an issue ''with me''
that I get the time it takes for the each target to be as small as I can.  This
means that I have to take and find the 'bottlenecks' in the existing process...
and look for additional ways - hopefully someone has already done more than the
number I have and can give suggestions... one of which I am looking at doing right
now thanks to a suggestion from the newsgroup.

Does that make sence?

Robin L. Burger
"Robin Burger" <robin.burger at bms.com>






Jamie Norwood wrote:

> I have an individual CFG file for each machine, and a small script
> I run from cron that runs MRTG on each of them. While I am only
> doing 5 mahcines... Is this a bad way to do it?
>
> Jamie
>
> On Thu, Oct 21, 1999 at 03:03:26PM -0500, Larry Sheldon wrote:
> > > Good afternoon from the wonderful state of CT.
> >
> > And from Nebraska!
> >
> > > I have one line item in my crontab that executes all of the instances
> > > (29) of MRTG that I want to run in the background. I thought about
> > > breaking out the Targets into seperate files, but from I can find in the
> > > e-mail log files this is '''not''' the way to do it.
> >
> > I wasn't bright enough to notice that--when ever a cronjob starts to run more
> > than a a couple of minutes, I stop putting new stuff in the related .cfg
> > file, start a new cron job a minute later, with its own .cfg.
> >
> > I'm now up to eight of them--yes, each of three of them share a "minute"
> > with another one--that seems not to matter, probably because in the mean-time
> > I forlifted a quicker machine under them.
> >
> > But it works just fine.
> > --
> > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> > .                                                                       .
> > - L. F. (Larry) Sheldon, Jr.                                            -
> > . Unix Systems and Network Administration                               .
> > - Creighton University Computer Center-Old Gym                          -
> > . 2500 California Plaza                                                 .
> > - Omaha, Nebraska, U.S.A.  68178       Two identifying characterstics   -
> > . lsheldon at creighton.edu                  of System Administrators:     .
> > - 402 280-2254 (work)                Infallibility, and the ability to  -
> > . 402 681-4726 (cellular)               learn from their mistakes.      .
> > - 402 332-4622 (residence)                                              -
> > . http://www.creighton.edu/~lsheldon    Adapted from Stephen Pinker     .
> > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> >
> > --
> > * To unsubscribe from the mrtg mailing list, send a message with the
> >   subject: unsubscribe to mrtg-request at list.ee.ethz.ch
> > * The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg
>
> --
> * To unsubscribe from the mrtg mailing list, send a message with the
>   subject: unsubscribe to mrtg-request at list.ee.ethz.ch
> * The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg

--
* To unsubscribe from the mrtg mailing list, send a message with the
  subject: unsubscribe to mrtg-request at list.ee.ethz.ch
* The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg


More information about the mrtg mailing list