[rrd-users] rrdtool getting incorrect values after update

Steve Shipway s.shipway at auckland.ac.nz
Wed Mar 13 23:16:33 CET 2013


> 1363128441 - 5791
> 1363128741 - 6665
> 1363129041 - 7482
> 
> And here are the results rrd has stored (this is from a xml dump):
>  <row><v> 2.9050692504e+00 </v></row>
>  <row><v> 2.8128932327e+00 </v></row>
> 
> Now as per my understanding, the first value should be the result from:
> (6665 - 5791)/300 = 2,913333333333333 ... which doesnt match the first
> value. The same issue applies to the second value and any other value i
> have
> tested. What am i doing wrong ?

Although you are updating every 300s, you are not updating exactly on the boundary.  Therefore, since your rates are not constant, in the stored value you'll get a bit of the first update and a bit of the second.

EG:

Buckets are 12:00-12:05, 12:05-12:10, etc
Update happens at 12:01, 12:06, 12:11 etc

So, when the 12:06 update happens, the 12:00-12:05 bucket is filled, using 20% of the 11:56-12:01 rate and 80% of the 12:01-12:06 rate.

Thus, you don’t get exactly the values you expect to see, because they are time-normalised.

If you round your update time down to a multiple of 300 then you'll see what you expect, though the values will then not be accurate...

Steve

Steve Shipway
ITS Unix Services Design Lead
University of Auckland, New Zealand
Floor 1, 58 Symonds Street, Auckland
Phone: +64 (0)9 3737599 ext 86487
DDI: +64 (0)9 924 6487
Mobile: +64 (0)21 753 189
Email: s.shipway at auckland.ac.nz
 Please consider the environment before printing this e-mail : 打印本邮件,将减少一棵树存活的机会


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5900 bytes
Desc: not available
Url : http://lists.oetiker.ch/pipermail/rrd-users/attachments/20130313/5d945d57/attachment-0001.bin 


More information about the rrd-users mailing list