[mrtg] Re: MRTG and the "early data gathering" phenomenon (problem?) (fwd)

Alex van den Bogaerdt alex at slot.hollandcasino.nl
Thu Sep 28 00:55:07 MEST 2000


Peter Stamfest wrote:

> Now for the interesting part: When looking at the code of mrtg, I found
> that there seem to be no provisions against "early data gathering". 

Look again then.  Also, check the docs; I'm pretty sure it is mentioned
in more than one place:  MRTG doesn't care.

MRTG uses rates; bytes per second.  It will subtract the previous counter
value (as available on line one of the log file) from the current one.
It will also subtract the previous time stamp (again: 1st line) from the
current one.  The rate is then calculated by doing deltaB/deltaT.

It doesn't matter if T is 300 seconds or 10 seconds, the resulting rate
will be correct as it is per ONE second in both cases.

May I suggest an experiment:

Create a config file for one nearby interface.  Copy this config file
to another name (say: mrtgtest1.cfg and mrtgtest2.cfg).
Use separate directories for them or change the name of the targets.
Use cron (or any other schedular) to start MRTG each interval (no daemon).
For mrtgtest1.cfg the interval is 5 minutes (the normal time).
For mrtgtest2.cfg the interval is 1 minute

The resulting graphs should be, approximately, the same.  If you also
view the graphs with the "WithPeak" option, they will probably differ
on the maxima as you're monitoring with a higher sample rate.

> before? Or an I totally wrong?

Not totally: see below.

> 3. A third possibility would be to put some restart logic into mrtg, that
> restarts mrtg when the configuration file changes (just doing a "exec
> mrtg ... " should suffice I guess, but I didn't think about it too much
> yet).

You present this as a solution for a problem that isn't there.  However,
I do think this will be a valuable addition to MRTG in daemon mode.
The config file will change from time to time and in stead of stopping
and starting the MRTG process by hand, it may be nice to have MRTG read
the new config file.

Not everybody will like this behaviour.  If you do work on this extension,
perhaps it would be better to make it optional.

regards,
-- 
   __________________________________________________________________
 / alex at slot.hollandcasino.nl                  alex at ergens.op.het.net \
| work                                                         private |
| My employer is capable of speaking therefore I speak only for myself |
+----------------------------------------------------------------------+
| Technical questions sent directly to me will be nuked. Use the list. | 
+----------------------------------------------------------------------+
| http://faq.mrtg.org/                                                 |
| http://rrdtool.eu.org  --> tutorial                                  |
+----------------------------------------------------------------------+

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