[mrtg] Re: Weird MRTG/RRDTool/14all.cgi Behaviour

Alex van den Bogaerdt alex at slot.hollandcasino.nl
Wed Feb 2 09:01:40 MET 2000


Jason D. Jordan wrote:
> 
> What appears to occur is that the Y-Axis goes up into the 100mb range (peak
> at 120mb)and the graph changes to show only peaks rather than showing a
> constant yet varying quantity of data as expected.

You've hit a limit:  the counters are 32-bit values and this only allows
for 2^32 bytes per interval.  Each interval is 300 seconds so the maximum
rate possible will be 2^32 / 300 == 14316557 Bps or 114532456 bps.

This is best shown with some examples:
The number 4294967296 is 2^32.

   time    counter value
   x                 100
   x+300      4294967395

In this case, the counter increased with 2^32-1.  When added to 100,
this will not fit in a 32-bit value so you need to apply the mod function
to it:  4294967395 mod 2^32 == 99.

MRTG will first see 100, the next poll will show 99.  This is not an increase
and MRTG assumes the device was reset (in this case: wrong assumption).
MRTG uses the previous rate, unless you have "Unknaszero" set.

   time    counter value
   x                 100
   x+300      4294967397

In this case, the counter increased with 2^32+1.  When added to 100,
this will not fit in a 32-bit value so you need to apply the mod function
to it:  4294967397 mod 2^32 == 101.

MRTG will first see 100, the next poll will show 101.  This is an increase
of 1 and MRTG has no means of knowing it really is 2^32+1.  It will use
value 1 and divided by 300 this is truncated to 0.

Increases above 2^32+299 will show on the graph as usual, albeit 2^32 too
low.

I'm not sure entirely but I think this is an SNMP_util problem and not
an MRTG problem.  If you are able to collect 64-bit counters from your
device, you could use the external program interface and try it out.

Another workaround is to alter the size of the interval.  As said:
the maximum possible increase is 2^32 per interval.  Poll every minute
and the limit will be reached somewhere near 560 mbps.

Make sure to understand that after a counter wrap, MRTG will not use the
value!

Regards,
-- 
   __________________________________________________________________
 / alex at slot.hollandcasino.nl                  alex at ergens.op.het.net \
| work                                                         private |
| My employer is capable of speaking therefore I speak only for myself |
+----------------------------------------------------------------------+

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:mrtg-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/mrtg



More information about the mrtg mailing list