# [mrtg] Re: Per minute option.

Eric Brander Eric_Mailing_List at rednarb.com
Fri Jun 20 14:42:39 MEST 2003

```----- Original Message -----

From: "Nic le Roux" <nicl at rohlig.co.za
<mailto:nicl at rohlig.co.za>> To: <mrtg at list.ee.ethz.ch
<mailto:mrtg at list.ee.ethz.ch>>

Sent: Friday, June 20, 2003 4:04 AM

Subject: [mrtg] Per minute option.

> A question on the way MRTG calculates averages,

I'm not sure what part of the averaging you don't
understand, so instead of providing a long dissertation on
it, I'll wait till you give a more detailed question

> and what happens when per minute option is added.

By default, the output will be "per second". Meaning that
(if the interval is 5 minutes) the 1st reading will be
subtracted by the 2nd reading that is gathered 5 minutes
later, and dividing the total by 300. So, if reading 1 is
100, and reading 2 is 1000, then 900/300 = 3 and therefore
MRTG will graph 3 whatevers per second. If in the default
mode, and monitoring a router or switch port, then it would
be 3 octets (bytes) per second average over 5 minutes.

Per Minute simply changes the division. In our example,
(1000-100)/5 = 180 octets (bytes) per minute average over 5
minutes.

> I added the perminute option to graph the errors that come
through. Before
> adding the per minute option it wouldn't graph anything,
now it does and
> "appears" correct, but I'm concerned as to why and what
exactly the
> perminute option does (I'm worried that I'm interpreting
the graph
> incorrectly.)

MRTG will not graph anything less than 1. If in one 5 minute
span, you only have 10 errors that's merely 0.03 errors per
second. MRTG will log that as a 0. If you use "perminute"
then MRTG will graph it as a 2.

10/300 = 0.03

10/5 = 2

>The X scale did not change, and appears exactly the same. I
> know its supposed to multiply the values by 60 but what
else does it do ?
> It seems that by multiplying the values by 60 something
else has to change
> ass well.

The x scale, on the daily graph anyway, is at 5-minute
intervals and this will not change regardless of per minute,
second or hour, or anyone's "ass". ;-)

> Also, after doing so, I added the per minute option to the
> (which was graphing values, but very small), and after
doing so some very
> big values started to come through, I did a manual snmpget
to see the
> change over approximately 6 hours, and I received a value
of 22000, which
> appears very big, but accepted as correct. So it seems in
order (the graph
> anyway), but i need some way of verifying that all is
well.

22000 discards over 6 hours is an average of 61.1 per minute
and 1.0185186 per second. So since you were using the
nothing but very low numbers. By the way, discards are a bad
thing, you should get that fixed!

As you can see, the data is always the same, but how its
reported is what is changed by the perminute and perhour
options. The only break of this rule is when you are dealing
with very small numbers that MRTG ignores.

HTH,

Eric Brander
Eric_Mailing_List at rednarb dot com

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