[rrd-users] Re: Unexpected NaN values

This is a discussion on [rrd-users] Re: Unexpected NaN values within the RRD Users forums, part of the Networking and Network Related category; On Fri, Nov 03, 2006 at 07:05:04PM -0500, jeffrey.j.petter@verizon.com wrote: [snip story about negative ...


Go Back   Usenet Forums > Networking and Network Related > RRD Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-04-2006
Alex van den Bogaerdt
 
Posts: n/a
Default [rrd-users] Re: Unexpected NaN values

On Fri, Nov 03, 2006 at 07:05:04PM -0500, jeffrey.j.petter@verizon.com wrote:


[snip story about negative numbers]

(could you please quote in a proper way, so I can do too? Thanks)

The problem seems to be that a number that should be treated as an
unsigned integer, is treated as a signed integer somewhere in the
chain.

This could be your device, or it could be your monitoring program.

It's like a mileage counter rolling over from 499,999 to -500,000.

For a one-byte counter, the numbers would look like:

.... 125, 126, 127, -128, -127, -126 ...
To solve, 256 - (negative number multiplied by -1)
which is: 2^8 - (negative number multiplied by -1)

A two byte counter:

.... 32764, 32765, 32766, 32767, -32768, -32767, -32766 ...
To solve, 65536 - (negative number multiplied by -1)
which is: 2^16 - (negative number multiplied by -1)

One byte counters: 2^8 - (negative number multiplied by -1)
Two byte counters: 2^16 - (negative number multiplied by -1)
Four byte counters: 2^32 - (negative number multiplied by -1)
Eight byte counters: 2^64 - (negative number multiplied by -1)

Find out which one it is (it won't be one or two) and work
around it in your script.

Alternatively, reset the counters as soon as they are going
into the danger zone. This may mean rebooting your device.

I don't think rrdtool should cope with this. Would it need
to assume the counter to be 1, 2, 4 or another amount of bytes?

Of course, hunting down the bug and fixing it at the proper
place in stead of working around it would be nice. Try fetching
values from your device manually if you can. Don't use the same
software your monitoring program uses right now. Still getting
negative numbers? Then the device is suspect. Getting positive
numbers? Then the snmp query program is suspect.

HTH
--
Alex van den Bogaerdt
http://www.vandenbogaerdt.nl/rrdtool/

--
Unsubscribe mailto:rrd-users-request@list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-users-request@list.ee.ethz.ch?subject=help
Archive http://lists.ee.ethz.ch/rrd-users
WebAdmin http://lists.ee.ethz.ch/lsg2.cgi

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:04 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0