That's why things like MRTg and the better RRD have a "maxvalue" setting...
now you can do mutiple things with that "maxvaule" which requires a little
bit of logic.. rrd may do it, I haven't dug into the code enough to know if
it does..
1) if ($curr_value < $maxvalue && ($previous_value+$curr_value) >
$max_counter_size) { $return_value = $curr_value-$max_counter_size;}
2) if $curr_value > $maxvalue then $return_value = 0;
The first one will check to see if it's wraped and also if it's valid
input... should work.. no guarantee's.. I just wrote it off the top of my
head...
But yes, most SNMP pollers have this logic built into them... if they
didn't... things would never be displayed correctly unless you have
something like a 1billion bit counter and only rebooted every few hundred
years... even then you should get a 'glitch' in the data...
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Lars Gaarden
Sent: Wednesday, August 20, 2003 17:05
To: [EMAIL PROTECTED]
Subject: Re: [smartBridges] SNMP logging (was: MORE ABOS crapping out)
Shawn Mitchell wrote:
> they shouldn't.. your only going to have a 32 bit or a 64 bit counter. So
> what happens when you get that counter full? your software craps out
again?
>
> The software needs to determine wether it's a 32 or 64 bit counter, and
> check to see if it's lowe than it was last time it was checked.
That was what I meant - some software will assume that the counter
wrapped around and you get a ridiculous value if the counter didn't
wrap but was reset instead.
Let's say that you poll the txframes value every 5 minutes, and you
get this:
previous_value = 1234567890
current_value = 1234
If the software assumes a 32bit unsigned counter (4294967295), and
assumes that the counter wrapped, you get:
4294967295 - 1234567890 + 1234 = 3060400639
3060400639/60/5 = 10201335 txframes/sec
The SNMP poller/reporter/grapher needs to know more about the values
to be able to determine whether the above result is valid or not (for
example a rule that says 'txframes per sec will never exceed 1000').
--
LarsG
The PART-15.ORG smartBridges Discussion List
To Join: mailto:[EMAIL PROTECTED] (in the body type subscribe
smartBridges <yournickname>
To Remove: mailto:[EMAIL PROTECTED] (in the body type unsubscribe
smartBridges)
Archives: http://archives.part-15.org
The PART-15.ORG smartBridges Discussion List
To Join: mailto:[EMAIL PROTECTED] (in the body type subscribe smartBridges
<yournickname>
To Remove: mailto:[EMAIL PROTECTED] (in the body type unsubscribe smartBridges)
Archives: http://archives.part-15.org