[mrtg] Re: Counter Or Gauge

Peter Glanville Peter_Glanville at cuk.canon.co.uk
Fri Sep 9 10:14:56 MEST 2005


> I have a situation where I am not sure what to instruct MRTG/RRD as the
> "type" of the expression. 
>
> Then I would make up a "target expression" like
>
> ((ifInOctets[ifIndex] + ifOutOctets[ifIndex]) * 8 / ifSpeed[ifIndex]) *
> 100
> 
> But unfortunately, both ifInOctest and ifOutOctets are MIB counter
> objects (their values keep increasing).
Yes, so you need to subtract the previous value. Therefore "Gauge" is out


> So although the resultant value of this expression should be a guage
> (because percent utilization for the interface keeps incrementing and
> decrementing),.... 

Faulty assumption.

> I have to set the type for this target expression as an MRTG counter. 

Correct

> But still it is incorrect, because when I label the expression as an
> MRTG/RRD counter, MRTG/RRD tracks the value as a "RATE" (difference in
> seconds) : which again makes the value being graphed incorrect.

What makes you say it's wrong?

If you plot ifInOctets with the Gauge option, you get Bytes since reboot, 
and a upward climbing line.
If you plot ifInOctets without the Gauge option you get a line that goes 
up and down, showing the average Bytes per second during each polling 
interval.
Mulitply by 8 and the graph appears the same (but with a different 
veritical scale), and shows bits per second during each polling interval.
Divide by ifSpeed and the graph is still the same shape
Multiply by 100 and the graph is stil the same shape, but the vertical 
axis is now showing percentage utilisation of the xxxbitspersecond link

The term RATE seems to confuse you. Non-Gauge graphs show the increase in 
a counter expressed as a perSecond value. You want the Percentage to be 
based on bitsPerSecond, so that is correct.


Peter


--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://lists.ee.ethz.ch/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the mrtg mailing list