Incorrect Wrap in nonNegativeDerivative

Reported by Tony Bunce on 2010-10-14
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Graphite
Fix Released
Undecided
Unassigned

Bug Description

I think the wrapping/rollover calculation used in nonNegativeDerivative is incorrect.

This is the current formula that is being used:
newValues.append( prev + (maxValue - val) )

I think the correct formula is:
 newValues.append( val+ (maxValue - prev) + 1 )
or
 newValues.append( maxValue + (prev- val) + 1 )

Look at "Counter Wraps" here:
http://www.mrtg.org/rrdtool/tut/rrdtutorial.en.html

For example on a 32 bit snmp counter:
MAX: 4294967295
Reading 1: 429496700
Reading 2: 100
Delta = -429496600
graphite value = ( 429496700 + (4294967295 - 100) ) = 4724463895
RRD Value = 429496700 + (4294967295 - 100) + 1 = 3865470696

I think 3865470696 is the correct value

chrismd (chrismd) on 2010-12-30
Changed in graphite:
status: New → Confirmed
chrismd (chrismd) wrote :

You're absolutely right, committing this fix to trunk.

Changed in graphite:
status: Confirmed → Fix Committed
chrismd (chrismd) on 2011-01-18
Changed in graphite:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers