[rrd-users] Fetching from the beginning of an RRD file

Alex van den Bogaerdt alex at ergens.op.het.net
Sat Mar 3 07:01:34 CET 2007


On Fri, Mar 02, 2007 at 04:12:09PM -0800, Travis Spencer wrote:
> On 2/28/07, Alex van den Bogaerdt <alex at ergens.op.het.net> wrote:
> 
> Hello Again Alex,
> 
> > Find out (using rrdtool info) how much entries there are on the wheel.
> > Find out how much time is stored in each entry.  Multiply those and
> > you know how much data to fetch.
> >
> > If each "step" is 300 seconds, if there are 24 steps per CDP, then each
> > CDP is 7200 seconds (2 hours).  If there are 600 CDPs in this RRA, then
> > there is 1200 hours (300*24*600) worth of data available.
> > In this example, --start now-1200h will probably do.  Perhaps add
> > --end start+24h to limit the amount of rows returned.
> 
> OK.  I'm throwing out all I know (or think I know) about SQL, putting
> on my RRD hat, and trying to figure this out.  From what you said
> above, I need three things to find the time of the initial entry:
> 
> 1. The step value

e.g. 300 seconds

> 2. The number of steps per CDP

aka as PDPs per CDP (called 'steps' internally)

> 3. The number of CDPs in the RRA

Indeed: rows.

>                 The output of rrd_info is showing me four RRAs with a
> CF of AVERAGE; they differ by `pdp_per_row' and `cdp_prep[j].value'.

Don't worry about the preparation area (cdp_prep).

> If `pdp_per_row' is what you mean by the number of steps per CDP, then
> which of these RRAs do I use?

Which do you want to use... Those different RRAs where made because
whoever created the database felt each one was necessary.

If you're interested in as much data as possible, without paying too
much attention to resolution, go for the RRA with the largest amount
of time in it.  Usually(!) this is the one with the most PDPs per CDP.

HTH
-- 
Alex van den Bogaerdt
http://www.vandenbogaerdt.nl/rrdtool/



More information about the rrd-users mailing list