[rrd-developers] PATCH: rrd_diff() and negative COUNTER/DERIVE datasource values
Sasha Mikheev
sasha at avalon-net.co.il
Tue Mar 4 21:00:15 MET 2003
Hi,
rrd_diff() does not produce correct result when 2 values are negative or
have different
signs. Some of the vendors (N*****k A*******e) have mibs where counter
values can be negative.
Also DERIVE datasource must work correctly even when both measurements are
negative.
Attached small patch against latest stable rrdtool to rrd_diff.c fixes the
case when 2 values are negative. Fixing the last case does not
have much practical value.
As a side question i wonder why not to convert function parameters to double
using strtod() and
then return the difference ?
Sasha Mikheev
Avalon Net Ltd, CTO
+972-50-481787, +972-4-8210307
http://www.avalon-net.co.il
-- Attached file removed by Ecartis and put at URL below --
-- Type: application/octet-stream
-- Size: 1k (1456 bytes)
-- URL : http://www.ee.ethz.ch/~slist/pantomime/rrd_diff.c.diff
--
Unsubscribe mailto:rrd-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-developers-request at list.ee.ethz.ch?subject=help
Archive http://www.ee.ethz.ch/~slist/rrd-developers
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the rrd-developers
mailing list