[rrd-users] Question about RRDTool ..

Simon Hobson linux at thehobsons.co.uk
Thu Mar 20 12:46:58 CET 2008


Jean-Yves Avenard wrote:

>  >  This is not an error. I thought the same but the reason is that rrdtool
>>   interpolates the given value based on the step compared to the one before.
>>   Only if you have absolutely STEP seconds between data points it will take
>>   the given value.
>
>I see.
>
>Is there a way to retrieve the exact value ?
>I am using RRD as an easy way to collect all my data and perform
>simple statistical analysis on it (average, max, min).
>
>But I want to be able to retrieve the value of an interval as it was
>entered for that interval.

Yes, enter it in such as way that normalisation is a null-operation.

Specifically, enter a new value with a timestamp of EXACTLY a 
multiple of 'step' seconds. Do this for each period of 'step' seconds 
(ie don't miss any).

If you do this, then each value entered is normalised to fit exactly 
the same time period as it covers and the result is like "multiply by 
1" - ie the operation is there but doesn't change anything.

>  >  After reading this in the documentation I think it is right way 
>because when
>>   collecting automatically you'll probably never get exactly the 
>>defined STEP!
>Yes that is true.
>It will take between 35s to 40s for my script to collect the data
>before it can be fed to RRDtool.

Record the time at the start of the script.

Since that probably isn't quite accurate (it might be 10:00:02 rather 
than 12:00:00 for example), then apply rounding to make it an exact 
multiple of step.

When you do your update, us the value determined rather than 'N'.

And remember that rrd uses UTC, NOT your local timezone.



More information about the rrd-users mailing list