[mrtg] Re: Counter Or Gauge

Tendolkar Mohit Mohit.Tendolkar at thomson.net
Thu Sep 8 23:27:08 MEST 2005


You misunderstood.

I am trying to get at means by which I can graph "expressions of the
type guage" which are constructed using "MIB objects that are counters".


I KNOW MRTG has the functionality to calculate percent utilization for
"network interfaces".

I just illustrated with my "fictitious" instance where the aim was: I
was trying to calculate/graph percent network utilization using my
custom formula, but didn't exactly know how to instruct MRTG/RRD to do
it - given that MRTG allows only guage or counter types for expressions
- neither of which are valid. I know that.

The aim is NOT to calculate any rate over an unknown time, rather the
aim of this fictitious example is to calculate % network utilization
since the time the value was last acquired. Can you suggest an MRTG
expression and type to do it?

Mohit

-----Original Message-----
From: mrtg-bounce at list.ee.ethz.ch [mailto:mrtg-bounce at list.ee.ethz.ch]
On Behalf Of PAUL WILLIAMSON
Sent: Thursday, September 08, 2005 1:45 PM
To: mrtg at list.ee.ethz.ch
Subject: [mrtg] Re: Counter Or Gauge

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

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

Paul


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



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