[mrtg] Re: Averages

Alex van den Bogaerdt alex at slot.hollandcasino.nl
Wed Sep 27 00:22:35 MEST 2000


Jeffrey Meltzer wrote:

> I monitor the bandwidth for numerous school districts.  I'm trying to get
> a more accurate look at their weekly/monthly/yearly bandwidth.  As most
> of the bandwidth is 7am-4pm, the 24 hour averages aren't very useful,
> since  i could have 8 hours of 1MB, and then 16 hours of 100k on those
> lines.
> 
> Could anybody lend a suggestion as to where I should begin tooking to make
> the graphs more accurate?

The graphs are accurate (assuming the system is setup correctly).
An average number of bytes per second, multiplied with the number of
seconds, should give you the total amount of bytes transfered.  This
should be valid for any period of time.  If you're looking at a daily
average (as you are doing in the yearly graph) you are looking at 24
hours per pixel.  It would be wrong to only look at 7am-4pm (for MRTG,
that is).

However, if you say that the line is (almost) idle during 16 hours of
the day, then you could consider multiplying the averages you get by 3.
This should give you a fairly accurate representation of the averages
over an eight hour period.

If you want "real" numbers, you have to program it yourself.

Some methods I can think of right now:

(1)
Each day (automated, after 4:10pm) collect the appropriate lines of
the log files.  Add up the averages and divide them by the number of
lines.  This will give you the average bandwidth used during that
time period.  You could also do this a day or so later but be warned:
after some time (2.5 days, from memory) the consolidation process will
interfere with your script.  It may seem to work during half of the
year, if so then it won't work during the other half (and vice versa).

If you'd like to graph the collected averages, I suggest to use RRDtool
and put the numbers in a database (as GAUGES).

(2)
Let a cron job set one of the MRTG process parameters at 8am and 4pm.
The MaxBytes (and AbsMax) should be set to 0 (perhaps it's necessary to
use 1 instead) during the off-hours and to the real number during the
school hours.  The target should be multiplied with 3.  The resulting
graph should only be used to monitor the average bandwidth used during
8am-4pm (or 9am-5pm etcetera, you get the picture).

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