[rrd-users] trying to understand the relationship between source data, what's in rrd and what gets plotted
linux at thehobsons.co.uk
Fri Jul 20 17:02:32 CEST 2007
Mark Seger wrote:
>I'm sure it's me and not rrdtool, but I can't figure out what's
>happening! Here's what did:
>- I have a data that has been generated at 1 second intervals
>- generated a plot with gnuplot as a known quantity
>- loaded the same data into rrdtool as absolute values and also with an
>interval of 1 sec
>- did a fetch of all the data
>- converted it to something I could load into excel and compare with the
>original values to make sure correct. they do NOT agree but are close.
>perhaps I a still to new to rrdtool to appreciate how my data can get
>adjusted, but I also would have thought using absolute and 1 second
>samples there wouldn't be anything to adjust.
> that's question 1. is
>there a way to make it not do that? I want to plot the values I've
>recorded and not some manipulated value. that's question 2.
Yes, if you follow some basic rules.
RRDs only store rates, not values - so even though you update with
absolute values, this is converted internally into rates.
You will get out what you put in (subject to internal rounding errors
etc) only if you meet all these conditions :
1) You input an update with a timestamp which is exactly aligned with
a multiple of step. Eg, if you use a step of 10s, then every update
must be an exact multiple of 10s.
2) You have an RRA within the RRD which is ONE step/consolidated value.
These two between them will eliminate normalisation (1) and aggregation (2).
If you ignore 1 then your input data will be normalised, if you
ignore 2 then your data will be consolidated.
3) When plotting/extracting data, you must select start and end times
which are also an exact multiple of your step AND the end time must
not be after the last full step time AND the start time must not be
before the length of your one step/consolidation RRA AND the number
of pixels in the graph (or data points extracted) should match the
number of samples between start and end.
This will eliminate normalisation of the extracted data or the use of
a lower resolution RRA.
Note that you can only extract data from RRAs (ie data that has
nominally been consolidated), but it's convenient that if you perform
consolidation with one value then you don't change it !
Alex has more on normalisation at his site
More information about the rrd-users