[mrtg] Re: Counter Or Gauge

PAUL WILLIAMSON pwilliamson at mandtbank.com
Thu Sep 8 22:44:49 MEST 2005

>>> "Tendolkar Mohit" <Mohit.Tendolkar at thomson.net> 09/08/05 3:57 PM
> Hi,

> ((ifInOctets[ifIndex] + ifOutOctets[ifIndex]) * 8 / 
> ifSpeed[ifIndex]) * 100

So, this looks like the percentage utilization in bits per second...

> But unfortunately, both ifInOctest and ifOutOctets are 
> MIB counter objects (their values keep increasing).

You are trying to replace the functionality inherent in 
MRTG to calculate the rate over time, but expressed as 
a percentage utilized over an unknown period of time.
What you are trying to do makes really no sense.
> So although the resultant value of this expression should be 
> a guage (because percent utilization for the interface keeps 
> incrementing and decrementing), I have to set the type for 
> this target expression as an MRTG counter. 

True, because you are trying to graph a number that really 
doesn't mean anything.

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

But you have a base assumption that the number you 
are attempting to graph makes any sense.  From your 
example, it does not.

> So how do you suggest I graph such expressions using 
> MRTG or RRD, which have MIB counter objects, but the 
> resultant values from the expression itself is NOT a rate?

Normally, this would be expressed as a GAUGE.

But because you are trying to graph the TOTAL octets 
passed through an interface since either a) restart or 
b) rollover, they really don't mean anything.

Let's take the following literal example based off your 
example, without regard to poll cycle...

MaxBytes: 500

Poll 0: 0 + 0 = 0 (start of system)
Poll 1: 50 + 50 = 100 (20%)
Poll 2: 75 + 100 = 175 (15%)
Poll 3: 200 + 125 = 325 (30%)
Poll 4: 250 + 175 = 425 (20%)

I'm sure Alex will be able to demonstrate this with specifics, 
but if you try to figure out anything other than the 5 minute 
utilization (via bps or %), there is not much more to gain.

I may just not be getting what you are trying to accomplish, 
but it seems like you either want an ever increasing percentage, 
or a static counter, neither of which really do what you want.

If you use the unscaled option, it will give you a visual 
representation of % utilization without having a 0-100% 
numbered scale on the y-axis.


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