[rrd-users] Get the timestamp of the very first data point from a RRD archive with multiple indexes
Rob Newman
rlnewman at ucsd.edu
Wed Aug 8 00:22:44 CEST 2007
Hi All,
I have an RRD archive:
%> rrdtool info TA_Z19A_clt.rrd
filename = "TA_Z19A_clt.rrd"
rrd_version = "0003"
step = 20
last_update = 1186523746
ds[clt].type = "GAUGE"
ds[clt].minimal_heartbeat = 21600
ds[clt].min = NaN
ds[clt].max = NaN
ds[clt].last_ds = "UNKN"
ds[clt].value = 0.0000000000e+00
ds[clt].unknown_sec = 0
rra[0].cf = "AVERAGE"
rra[0].rows = 1200
rra[0].pdp_per_row = 20
rra[0].xff = 5.0000000000e-01
rra[0].cdp_prep[0].value = 0.0000000000e+00
rra[0].cdp_prep[0].unknown_datapoints = 0
rra[1].cf = "MAX"
rra[1].rows = 700
rra[1].pdp_per_row = 60
rra[1].xff = 5.0000000000e-01
rra[1].cdp_prep[0].value = 0.0000000000e+00
rra[1].cdp_prep[0].unknown_datapoints = 0
rra[2].cf = "AVERAGE"
rra[2].rows = 4320
rra[2].pdp_per_row = 20
rra[2].xff = 5.0000000000e-01
rra[2].cdp_prep[0].value = 0.0000000000e+00
rra[2].cdp_prep[0].unknown_datapoints = 0
rra[3].cf = "AVERAGE"
rra[3].rows = 3600
rra[3].pdp_per_row = 168
rra[3].xff = 5.0000000000e-01
rra[3].cdp_prep[0].value = 0.0000000000e+00
rra[3].cdp_prep[0].unknown_datapoints = 0
rra[4].cf = "AVERAGE"
rra[4].rows = 2630
rra[4].pdp_per_row = 1000
rra[4].xff = 5.0000000000e-01
rra[4].cdp_prep[0].value = 0.0000000000e+00
rra[4].cdp_prep[0].unknown_datapoints = 0
rra[5].cf = "AVERAGE"
rra[5].rows = 31556
rra[5].pdp_per_row = 1000
rra[5].xff = 5.0000000000e-01
rra[5].cdp_prep[0].value = 0.0000000000e+00
rra[5].cdp_prep[0].unknown_datapoints = 0
I want to know the timestamp of the very first data point that I ever
put in the archive. I know that this was 1177448702 (4/24/2007
21:05:02) via another means. However, if I use 'rrdtool first' and
use each index in turn (0 thru 5) I get the following values:
INDEX 0 (the default)
-----------------------------
%> rrdtool first TA_Z19A_clt.rrd
1186044800
%> epoch 1186044800
1186044800.000 (214) 2007-08-02 08:53:20.00000 UTC Thursday
INDEX 1
----------
%> rrdtool first --rraindex 1 TA_Z19A_clt.rrd
1185685200
%> epoch 1185685200
1185685200.000 (210) 2007-07-29 05:00:00.00000 UTC Sunday
INDEX 2
----------
%> rrdtool first --rraindex 2 TA_Z19A_clt.rrd
1184796800
%> epoch 1184796800
1184796800.000 (199) 2007-07-18 22:13:20.00000 UTC Wednesday
INDEX 3
----------
%> rrdtool first --rraindex 3 TA_Z19A_clt.rrd
1174430880
%> epoch 1174430880
1174430880.000 (079) 2007-03-20 22:48:00.00000 UTC Tuesday
INDEX 4
----------
%> rrdtool first --rraindex 4 TA_Z19A_clt.rrd
1133940000
%> epoch 1133940000
1133940000.000 (341) 2005-12-07 07:20:00.00000 UTC Wednesday
INDEX 5
----------
%> rrdtool first --rraindex 5 TA_Z19A_clt.rrd
555420000
1%> epoch 555420000
555420000.000 (220) 1987-08-08 11:20:00.00000 UTC Saturday
I understand why I get the 1987 value (the default start of any RRD
archive which hasn't been populated yet) for index 5, and also why I
get the other timestamp values. However, if I want to draw a plot of
the lifetime of the variable, is there a way where I can
unequivocally get the timestamp of the very, very first 'real' (ie.
added by 'rrdtool update') data point and then use that for my
'rrdtool graph' call (--start argument)? This might be simple, I just
can't seem to figure it out from the man pages.
Thanks in advance,
- Rob
More information about the rrd-users
mailing list