[rrd-users] Actual interpolation method
Tobias Oetiker
tobi at oetiker.ch
Wed Apr 8 17:58:08 CEST 2009
Hi Mack,
slope is calculated at the very end, so what happens, is we sum up
value * duration until a bin is full taking the number of 'unknown'
seconds into account and finally we divide the sum by the number of
known seconds ...
if you have a good test for this, please feel free to add this to
the rrdtool wicki on the rrdtool website.
cheers
tobi
Yesterday Macckone at aol.com wrote:
> I am looking for a description of the actual interpolation method used to
> convert data points to RRAs in the specific case of 1:1 correspondence.
>
> Rate generation data:
>
>
> 920805000:10
> 920805300:20
> 920805600:10
> 920805900:10
>
> Generated data:
>
>
>
> 920805000:000
> 920805300:3000
> 920805600:9000
> 920805900:12000
>
>
> Example data:
> 920805000:000
> 920805305:3100
> 920805603:9030
> 920805907:12070
>
> RRD results:
> <!-- 1999-03-07 05:10:00 CST / 920805000 -->
> <row><v> NaN </v></row>
> <!-- 1999-03-07 05:15:00 CST / 920805300 --> <row><v> 1.0163934426e+01
> </v></row>
> <!-- 1999-03-07 05:20:00 CST / 920805600 --> <row><v> 1.9737072285e+01
> </v></row>
> <!-- 1999-03-07 05:25:00 CST / 920805900 --> <row><v> 1.0098993289e+01
> </v></row>
>
> The first data point is what would be expected.
> ie. 3100/305.= 10.163934426
>
> For the additional data point:
> 5930/298 = 19.899328859
>
> Then it look like we first interpolate the data point for
> 92805300 = 3049.1803279
>
> That gives
> 5980.8197213/303=19.738678948
> Which is close but still differs in the 5th decimal place.
>
> If we do a full second degree interpolation:
> 92805300 = 3049.1803279
>
> 92805600 = 19.899328859*295+3100 = 8970.302013405
>
> So
> 8970.302013405-3049.1803279=5921.1216855
> 5921.1216855/300 = 19.737072285
>
> This seems to be what is done but I have not seen a description anywhere.
> Is this indeed what is done?
> First interpolating the data points and then calculating the slope?
> The final data point below seems to confirm this.
> Could this be added to the FAQ or the documentation some where?
>
> Mack
>
> Ammendum:
> For the final data point.
> 3040/304=10
>
> 92805900 = 10*297+9030 =12000
> 12000-8970.302013405=3029.697986595
> 3029.697986595/300=10.098993289
>
> **************A Good Credit Score is 700 or Above. See yours in just 2 easy
> steps!
> (http://pr.atwola.com/promoclk/100126575x1221421323x1201417385/aol?redir=http:%2F%2Fwww.freecreditreport.com%2Fpm%2Fdefault.aspx%3Fsc%3D668072%26
> hmpgID%3D62%26bcd%3DAprilfooterNO62)
>
--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi at oetiker.ch ++41 62 775 9902 / sb: -9900
More information about the rrd-users
mailing list