[mrtg] Re: Why does it work as a gauge but not a rate?

Drew Dowling drewhead at vnet.net
Thu Jul 27 22:11:43 MEST 2000


At 07:50 AM 7/27/00 -0500, Stieers, Ken wrote:
>
>By default MRTG does the following calculation and graphs it:
>
>(new reading - old reading)/time elapsed
>
>Options: absolute does the following:
>
>New reading/time elapsed
>
>Options: gauge does no calculations
>
>
>Your results tell me that the difference between the old reading and the new
>reading are very small, so the division by 300 (seconds in 5 min) comes out
>less than 1.  Since MRTG only does integers, you get 0.  You might want to
>look at the Perminute or Perhour options.
>
>

Or... since he's getting his data from a shell script, simply mutiply the
data by 300 (assuming a five minute interval) inside the script before
returning.  That would negate the time elasped divisor effectivaly leaving
him with the raw number diffrence per interval. Adjustments could be made
for other intervals obviously.  ... in theory that is.  I've not (yet)
tested this.  :)
--
Drew Dowling      	drewhead at vnet.net
CTC Internet Services	Engineering
http://www.ctc.net


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