[mrtg] Re: Negative Numbers

Alex van den Bogaerdt alex at slot.hollandcasino.nl
Fri Apr 13 01:48:31 MEST 2001


Plane, Robert wrote:

> I'm trying to graph the bytes/sec on our Cisco Local Director.  Everything
> was running great until the counters started coming back negative. The are
> now counting back to 0. Has anyone seen this??

Can't say I've seen this but it can probably be explained.

If you're using 32-bit counters, and if those counters are being
stored into integers with sign, the counter will overflow at
(2^31)-1.  The next value will not be 2^31 , it will be -(2^31).

I don't know if it is possible but if it is: use 64-bit counters.
If you are already using 64-bit counters but they still overflow
at 2^32, Cisco is in error.

Another solution (or rather a workaround) would be to use the
absolute option and query the counters using a script that resets
the counters to zero after reading them. You need the external
program interface.

cheers,
-- 
   __________________________________________________________________
 / 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 |
+----------------------------------------------------------------------+
| Technical questions sent directly to me will be nuked. Use the list. | 
+----------------------------------------------------------------------+
| http://faq.mrtg.org/                                                 |
| http://rrdtool.eu.org  --> tutorial                                  |
+----------------------------------------------------------------------+

--
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
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list