[rrd-users] Extracting data - getting wrong step size.......
Dave Whitehead
DaveW at marwell.org.uk
Wed Dec 15 18:04:08 CET 2010
This is 1.2.30 on Windows with PERL 5.10..........
I have a RRD which records power usage every 5 mins into several GAUGE
DS. It has 2 RRA's one recording the average every 5 mins for a year and
the other the average every hour for about 5 years. I have about 9
months data in the RRD (I hope).
I'm hoping I've set this up right..........
Step = 300 (5 mins)
RRA for years data = 105120 rows with one 1 PDP per row (12 PDP per hr *
24 * 365 = 105120)
RRA for 10 yrs = 43800 rows with 12 PDP per row (1 PDP per hr * 24 *
365 * 10 = 43800)
Output from rrdinfo below..........
------------------------------------------------------------------------
---------------
filename = "kwh.rrd"
rrd_version = "0003"
step = 300
last_update = 1292430224
ds[graze_0].type = "GAUGE"
ds[graze_0].minimal_heartbeat = 900
ds[graze_0].min = NaN
ds[graze_0].max = 6.0000000000e+004
ds[graze_0].last_ds = "9075"
ds[graze_0].value = 2.0331834278e+006
ds[graze_0].unknown_sec = 0
ds[edctr_0].type = "GAUGE"
ds[edctr_0].minimal_heartbeat = 900
ds[edctr_0].min = NaN
ds[edctr_0].max = 6.0000000000e+004
ds[edctr_0].last_ds = "8843"
ds[edctr_0].value = 1.9812056256e+006
ds[edctr_0].unknown_sec = 0
ds[hall_0].type = "GAUGE"
ds[hall_0].minimal_heartbeat = 900
ds[hall_0].min = NaN
ds[hall_0].max = 6.0000000000e+004
ds[hall_0].last_ds = "22572"
ds[hall_0].value = 5.0570816896e+006
ds[hall_0].unknown_sec = 0
ds[it_0].type = "GAUGE"
ds[it_0].minimal_heartbeat = 900
ds[it_0].min = NaN
ds[it_0].max = 6.0000000000e+004
ds[it_0].last_ds = "U"
ds[it_0].value = NaN
ds[it_0].unknown_sec = 224
ds[it_1].type = "GAUGE"
ds[it_1].minimal_heartbeat = 900
ds[it_1].min = NaN
ds[it_1].max = 6.0000000000e+004
ds[it_1].last_ds = "U"
ds[it_1].value = NaN
ds[it_1].unknown_sec = 224
ds[shop_0].type = "GAUGE"
ds[shop_0].minimal_heartbeat = 900
ds[shop_0].min = NaN
ds[shop_0].max = 6.0000000000e+004
ds[shop_0].last_ds = "5047"
ds[shop_0].value = 1.1307412408e+006
ds[shop_0].unknown_sec = 0
ds[encounter_0].type = "GAUGE"
ds[encounter_0].minimal_heartbeat = 900
ds[encounter_0].min = NaN
ds[encounter_0].max = 6.0000000000e+004
ds[encounter_0].last_ds = "41800"
ds[encounter_0].value = 9.3649660918e+006
ds[encounter_0].unknown_sec = 0
ds[penguins_0].type = "GAUGE"
ds[penguins_0].minimal_heartbeat = 900
ds[penguins_0].min = 0.0000000000e+000
ds[penguins_0].max = 2.0000000000e+004
ds[penguins_0].last_ds = "9474"
ds[penguins_0].value = 2.1225762860e+006
ds[penguins_0].unknown_sec = 0
rra[0].cf = "AVERAGE"
rra[0].rows = 105120
rra[0].cur_row = 32306
rra[0].pdp_per_row = 1
rra[0].xff = 5.0000000000e-001
rra[0].cdp_prep[0].value = NaN
rra[0].cdp_prep[0].unknown_datapoints = 0
rra[0].cdp_prep[1].value = NaN
rra[0].cdp_prep[1].unknown_datapoints = 0
rra[0].cdp_prep[2].value = NaN
rra[0].cdp_prep[2].unknown_datapoints = 0
rra[0].cdp_prep[3].value = NaN
rra[0].cdp_prep[3].unknown_datapoints = 0
rra[0].cdp_prep[4].value = NaN
rra[0].cdp_prep[4].unknown_datapoints = 0
rra[0].cdp_prep[5].value = NaN
rra[0].cdp_prep[5].unknown_datapoints = 0
rra[0].cdp_prep[6].value = NaN
rra[0].cdp_prep[6].unknown_datapoints = 0
rra[0].cdp_prep[7].value = NaN
rra[0].cdp_prep[7].unknown_datapoints = 0
rra[1].cf = "AVERAGE"
rra[1].rows = 43800
rra[1].cur_row = 2691
rra[1].pdp_per_row = 12
rra[1].xff = 5.0000000000e-001
rra[1].cdp_prep[0].value = 4.6314812751e+004
rra[1].cdp_prep[0].unknown_datapoints = 0
rra[1].cdp_prep[1].value = 3.5581788458e+004
rra[1].cdp_prep[1].unknown_datapoints = 0
rra[1].cdp_prep[2].value = 9.1144245894e+004
rra[1].cdp_prep[2].unknown_datapoints = 0
rra[1].cdp_prep[3].value = NaN
rra[1].cdp_prep[3].unknown_datapoints = 4
rra[1].cdp_prep[4].value = NaN
rra[1].cdp_prep[4].unknown_datapoints = 4
rra[1].cdp_prep[5].value = 2.0281055205e+004
rra[1].cdp_prep[5].unknown_datapoints = 0
rra[1].cdp_prep[6].value = 1.6542493724e+005
rra[1].cdp_prep[6].unknown_datapoints = 0
rra[1].cdp_prep[7].value = 3.8811111275e+004
rra[1].cdp_prep[7].unknown_datapoints = 0
------------------------------------------------------------------------
------------------------
The data appears to be stored ok and I get correct graphs.
However I've been asked to extract raw data for the period 1st July to
2nd Aug for this year....... I'm using the following command
rrdtool xport -s Jul_1 -e Aug_2 DEF:graze=kwh.rrd:graze_0:AVERAGE
XPORT:graze:graze
This runs ok and if I feed the epoch figure into a converter I have the
right time period ..... sample of output below.....
------------------------------------------------------------------------
------------------------
graze:7200
step: 7200
<?xml version="1.0" encoding="ISO-8859-1"?>
<xport>
<meta>
<start>1278000000</start>
<step>7200</step>
<end>1280757600</end>
<rows>384</rows>
<columns>1</columns>
<legend>
<entry>graze</entry>
</legend>
</meta>
<data>
<row><t>1278000000</t><v>NaN</v></row>
<row><t>1278007200</t><v>1.6631307823e+004</v></row>
<row><t>1278014400</t><v>1.4868084028e+004</v></row>
<row><t>1278021600</t><v>1.3574603671e+004</v></row>
<row><t>1278028800</t><v>1.4914907069e+004</v></row>
<row><t>1278036000</t><v>1.5151102869e+004</v></row>
<row><t>1278043200</t><v>1.5472715407e+004</v></row>
<row><t>1278050400</t><v>1.5544548597e+004</v></row>
<row><t>1278057600</t><v>2.3881742197e+004</v></row>
<row><t>1278064800</t><v>4.7964865868e+004</v></row>
<row><t>1278072000</t><v>4.7905541709e+004</v></row>
<row><t>1278079200</t><v>4.1197159846e+004</v></row>
<row><t>1278086400</t><v>3.1101457296e+004</v>
------------------------------------------------------------------------
--------------------------------------
The problem is I was hoping to get the data out from the 5 min RRA and
this seems to be every 2 hours (7200 step)
I tried -step 300 in the command with no change in the output
Any guidance as to what I'm doing wrong would be welcome............
Thanks
Dave
Dave Whitehead | IT & Telecomms Manager | Marwell Wildlife | Colden
Common | Winchester | SO21 1JH
( Direct: +44 (0)1962 777930 | Mob: +44 (0)7881 408657 +
davew at marwell.org.uk <mailto:davew at marwell.org.uk> : www.marwell.org.uk
<http://www.marwell.org.uk/>
-----------------------------------------
Please print responsibly
Marwell Wildlife is a limited liability company registered in England and Wales under number 1355272.
VAT No. 631 9661 30. The company is a registered charity, number 275433
Registered office: Marwell Wildlife, Colden Common, Winchester, Hampshire, SO21 1JH.
Opinions expressed in this e-mail are those of the individual, not the company unless specifically indicated to that effect. This e-mail and any attachments are confidential and solely for the use of the intended recipient. If you are not the intended recipient we apologise for any inconvenience. Please return to the sender. Any use or copying is strictly prohibited.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/rrd-users/attachments/20101215/9a5a1bce/attachment-0001.htm
More information about the rrd-users
mailing list