[mrtg] Re: SNMPv2c

Ken Kirchner kenk at shreve.net
Thu Jul 13 00:12:58 MEST 2000



I need some help writing a custom script that uses the MRTG log files.

Since a lot of you guys no doubt use mrtg, I was hoping someone could
help.  The script has to compute the average KBytes in/out for the past
30 days.  I have sucessfully accomplished this, I believe, but the figures
I am arriving at do not match what the MRTG web page displays for the
interface I am monitoring.  Most of the time it is off by less than 2K,
but sometimes it can be off as much as 13K.

The core of my formula depends on the values of lines 1204 through 1564
in the log file.  These are the 120 minute interval averages for the past
30 days. I add up the avg in/out values of those 360 lines and divide by
360 to get my monthly average.  Like I said, this is usually very close to
the MRTG page, but sometimes differs by quite a bit.

Does anyone know what formula the MRTG software uses to determine the
monthly average displayed on the html page?  Can anyone see any flaws in
my own method of determining the monthly average? Is the monthly average
based on the first 30 days worth of data from the log (to include the
first week of 30 minute averages), or is it based completely on 30 days
worth of 120 minute averages? Something else maybe?

All help is greatly appreciated.

-Ken


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