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

Alex van den Bogaerdt alex at ergens.op.het.net
Thu Mar 1 03:57:35 CET 2007


On Wed, Feb 28, 2007 at 05:05:30PM -0800, Travis Spencer wrote:

> I am trying to fetch all data from the begging of an RRD file.  I'm
> not sure when the first entry was added to it

Think of the database as a wheel.  There is no beginning nor an end.
There is a pointer to the last entry written.  That's the most recent
available data.  Next to it is older, next to that one is older, and
so on.  When you are back at the pointer, you have seen all available
data.

If you didn't know this, perhaps you should look at the documentation,
the tutorials and my site for more info.

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.

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



More information about the rrd-users mailing list