[rrd-users] Question with 1-hour samples

Simon Hobson linux at thehobsons.co.uk
Thu Jan 20 16:25:08 CET 2011


Jason wrote:

>I'm beginning to suspect that my problem is not understanding and
>therefore using the CF functions correctly on my data, for MAXIMUM
>versus AVERAGE.  That is why my 5-minute averages look correct to me
>(and what I'm intending to do), while my 1-hour averages are not what
>I'm trying to achieve with my graph.

OK, in short, lets assume you keep stuffing values in at least as 
often as your step size.

Firstly, RRD will normalise your data to get a SINGLE value for each 
STEP period. So, for example and assuming 5 minute (300s) step size, 
you will get a SINGLE value for the period 03:05 to 03:10. This is 
called a Primary Data Point (PDP). It does not matter if you feed in 
a new value every second - you only get ONE PDP for each STEP period.
Min, Max, Average have no bearing at all on this as there is only 
ever a single value for the step.

Next, every so often you will complete the number of steps required 
to fill a consolidated data point. If, for example, you consolidate 
12 PDPs into a Consolidated Data Point (CDP) - this will happen on 
the hour since all time calculations are referenced to Unix epoch 
(Midnight, 1st Jan 1970 UTC).
So, you keep stuffing in updates, and come 04:00 RRD will take the 12 
PDPs covering 03:00 to 04:00 and consolidate them.
For an AVERAGE consolidation, it will take the average. For a 
MAXMIMUM consolidation it will take the maximum, and for a MINIMUM 
consolidation it takes the minimum. Note that in all cases, these are 
not calculated from the values you put in, but from the normalised 
values stored in the PDPs.

-- 
Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.



More information about the rrd-users mailing list