[rrd-users] rrdtool export

Jason Signalness jason at btiadmin.net
Wed Feb 12 22:28:08 MET 2003


Hello,

I've been having some trouble getting the desired data from an rrd using 
xport.  I realize that I could use dump, but that spits out too much 
data... slows things down in another process.  Anyway, I appreciate any 
advice.  Here's my problem:

My rrd was created by Cricket.  I want all the data from the second RRA 
(the 1/2 hour readings) dumped or exported to XML.  I believe  RRDtool 
will do it for me using the xport command, but I can't seem to get all 
600 samples.  It always gives me about half of them.

For example... below is the structure of the rrd (from rrdtoool info). 
I'm only interested in the first datasource:

> filename = "/opt/cricket/cricket-data/bepc/generation/cwp.rrd"
> rrd_version = "0001"
> step = 300
> last_update = 1045083365
> ds[ds0].type = "GAUGE"
> ds[ds0].minimal_heartbeat = 1800
> ds[ds0].min = 0.0000000000e+00
> ds[ds0].max = NaN
> ds[ds0].last_ds = "UNKN"
> ds[ds0].value = 0.0000000000e+00
> ds[ds0].unknown_sec = 0
> ds[ds1].type = "GAUGE"
> ds[ds1].minimal_heartbeat = 1800
> ds[ds1].min = 0.0000000000e+00
> ds[ds1].max = NaN
> ds[ds1].last_ds = "UNKN"
> ds[ds1].value = 0.0000000000e+00
> ds[ds1].unknown_sec = 0
> ds[ds2].type = "GAUGE"
> ds[ds2].minimal_heartbeat = 1800
> ds[ds2].min = 0.0000000000e+00
> ds[ds2].max = NaN
> ds[ds2].last_ds = "UNKN"
> ds[ds2].value = 0.0000000000e+00
> ds[ds2].unknown_sec = 0
> ds[ds3].type = "GAUGE"
> ds[ds3].minimal_heartbeat = 1800
> ds[ds3].min = 0.0000000000e+00
> ds[ds3].max = NaN
> ds[ds3].last_ds = "UNKN"
> ds[ds3].value = 0.0000000000e+00
> ds[ds3].unknown_sec = 0
> rra[0].cf = "AVERAGE"
> rra[0].rows = 600
> rra[0].pdp_per_row = 1
> rra[0].xff = 5.0000000000e-01
> 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[1].cf = "AVERAGE"
> rra[1].rows = 600
> rra[1].pdp_per_row = 6
> rra[1].xff = 5.0000000000e-01
> rra[1].cdp_prep[0].value = 1.3655952921e+02
> rra[1].cdp_prep[0].unknown_datapoints = 0
> rra[1].cdp_prep[1].value = 0.0000000000e+00
> rra[1].cdp_prep[1].unknown_datapoints = 0
> rra[1].cdp_prep[2].value = 0.0000000000e+00
> rra[1].cdp_prep[2].unknown_datapoints = 0
> rra[1].cdp_prep[3].value = 0.0000000000e+00
> rra[1].cdp_prep[3].unknown_datapoints = 0
> rra[2].cf = "AVERAGE"
> rra[2].rows = 600
> rra[2].pdp_per_row = 24
> rra[2].xff = 5.0000000000e-01
> rra[2].cdp_prep[0].value = 2.3305825580e+02
> rra[2].cdp_prep[0].unknown_datapoints = 0
> rra[2].cdp_prep[1].value = 0.0000000000e+00
> rra[2].cdp_prep[1].unknown_datapoints = 0
> rra[2].cdp_prep[2].value = 0.0000000000e+00
> rra[2].cdp_prep[2].unknown_datapoints = 0
> rra[2].cdp_prep[3].value = 0.0000000000e+00
> rra[2].cdp_prep[3].unknown_datapoints = 0
> rra[3].cf = "MAX"
> rra[3].rows = 600
> rra[3].pdp_per_row = 24
> rra[3].xff = 5.0000000000e-01
> rra[3].cdp_prep[0].value = 4.3076666667e+01
> rra[3].cdp_prep[0].unknown_datapoints = 0
> rra[3].cdp_prep[1].value = 0.0000000000e+00
> rra[3].cdp_prep[1].unknown_datapoints = 0
> rra[3].cdp_prep[2].value = 0.0000000000e+00
> rra[3].cdp_prep[2].unknown_datapoints = 0
> rra[3].cdp_prep[3].value = 0.0000000000e+00
> rra[3].cdp_prep[3].unknown_datapoints = 0
> rra[4].cf = "AVERAGE"
> rra[4].rows = 600
> rra[4].pdp_per_row = 288
> rra[4].xff = 5.0000000000e-01
> rra[4].cdp_prep[0].value = 2.9970983237e+02
> rra[4].cdp_prep[0].unknown_datapoints = 234
> rra[4].cdp_prep[1].value = 0.0000000000e+00
> rra[4].cdp_prep[1].unknown_datapoints = 225
> rra[4].cdp_prep[2].value = 0.0000000000e+00
> rra[4].cdp_prep[2].unknown_datapoints = 225
> rra[4].cdp_prep[3].value = 0.0000000000e+00
> rra[4].cdp_prep[3].unknown_datapoints = 225
> rra[5].cf = "MAX"
> rra[5].rows = 600
> rra[5].pdp_per_row = 288
> rra[5].xff = 5.0000000000e-01
> rra[5].cdp_prep[0].value = 4.3076666667e+01
> rra[5].cdp_prep[0].unknown_datapoints = 234
> rra[5].cdp_prep[1].value = 0.0000000000e+00
> rra[5].cdp_prep[1].unknown_datapoints = 225
> rra[5].cdp_prep[2].value = 0.0000000000e+00
> rra[5].cdp_prep[2].unknown_datapoints = 225
> rra[5].cdp_prep[3].value = 0.0000000000e+00
> rra[5].cdp_prep[3].unknown_datapoints = 225


Here is how I'm trying to export the data:


 > /opt/RRDTool/bin/rrdtool xport \
 >    --start -12.5days --step 1800 \
 >    DEF:generation=.../cwp.rrd:ds1:AVERAGE \
 >    XPORT:generation::


And here is what the xport spits out (notice only 242 rows, not 600):


 > <?xml version="1.0" encoding="ISO-8859-1"?>
 >
 > <xport>
 >   <meta>
 >     <start>1044651600</start>
 >     <step>1800</step>
 >     <end>1045085400</end>
 >     <rows>242</rows>       <--- why not 600?
 >     <columns>1</columns>
 >     <legend>
 >       <entry></entry>
 >     </legend>
 >   </meta>
 >   <data>
 >     <row><t>1044651600</t><v>0.0000000000e+00</v></row>
 >     <row><t>1044653400</t><v>0.0000000000e+00</v></row>
 >     . . .
 >   </data>
 > </xport>

Any help would be appreciated!  Thanks,

-- 
Jason Signalness, Systems Administrator
Basin Telecommunications, Inc.
--

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list