[rrd-users] rrdfetch returning too many rows

Edward Quick edwardquick at hotmail.com
Mon Nov 12 12:24:37 CET 2007


Hi,

I would like to fetch the hourly averages for a particular datasouce in an rrd file for the last 24 hours.
The command I'm using is similar to the one on the man page for rrdfetch:

rrdtool fetch $rrdfile AVERAGE -r $rrdres -e @{[int($ctime/$rrdres)*$rrdres]} -s e-24h

However, this returns 50 rows, instead of 24. Also is there a way for me just to pull out one datasource, instead of all of them?

Thanks for any help.

Ed.

This is my rrd file info:

filename = "/ac/appl/rra/solaris/smpl336/CPU_Utilisation.rrd"
rrd_version = "0003"
step = 60
last_update = 1194790260
ds[CPUIdleTime].type = "GAUGE"
ds[CPUIdleTime].minimal_heartbeat = 120
ds[CPUIdleTime].min = NaN
ds[CPUIdleTime].max = NaN
ds[CPUIdleTime].last_ds = "UNKN"
ds[CPUIdleTime].value = 0.0000000000e+00
ds[CPUIdleTime].unknown_sec = 0
ds[CPUSysTime].type = "GAUGE"
ds[CPUSysTime].minimal_heartbeat = 120
ds[CPUSysTime].min = NaN
ds[CPUSysTime].max = NaN
ds[CPUSysTime].last_ds = "UNKN"
ds[CPUSysTime].value = 0.0000000000e+00
ds[CPUSysTime].unknown_sec = 0
ds[CPUUserTime].type = "GAUGE"
ds[CPUUserTime].minimal_heartbeat = 120
ds[CPUUserTime].min = NaN
ds[CPUUserTime].max = NaN
ds[CPUUserTime].last_ds = "UNKN"
ds[CPUUserTime].value = 0.0000000000e+00
ds[CPUUserTime].unknown_sec = 0
ds[CPUWio].type = "GAUGE"
ds[CPUWio].minimal_heartbeat = 120
ds[CPUWio].min = NaN
ds[CPUWio].max = NaN
ds[CPUWio].last_ds = "UNKN"
ds[CPUWio].value = 0.0000000000e+00
ds[CPUWio].unknown_sec = 0
rra[0].cf = "AVERAGE"
rra[0].rows = 26352
rra[0].pdp_per_row = 5
rra[0].xff = 5.0000000000e-01
rra[0].cdp_prep[0].value = 9.6212500000e+01
rra[0].cdp_prep[0].unknown_datapoints = 0
rra[0].cdp_prep[1].value = 2.3208300000e+00
rra[0].cdp_prep[1].unknown_datapoints = 0
rra[0].cdp_prep[2].value = 1.0000000000e+00
rra[0].cdp_prep[2].unknown_datapoints = 0
rra[0].cdp_prep[3].value = 4.6666700000e-01
rra[0].cdp_prep[3].unknown_datapoints = 0
rra[1].cf = "AVERAGE"
rra[1].rows = 8784
rra[1].pdp_per_row = 30
rra[1].xff = 5.0000000000e-01
rra[1].cdp_prep[0].value = 1.0412208000e+03
rra[1].cdp_prep[0].unknown_datapoints = 0
rra[1].cdp_prep[1].value = 3.3233320000e+01
rra[1].cdp_prep[1].unknown_datapoints = 0
rra[1].cdp_prep[2].value = 1.9645834000e+01
rra[1].cdp_prep[2].unknown_datapoints = 0
rra[1].cdp_prep[3].value = 5.9000000000e+00
rra[1].cdp_prep[3].unknown_datapoints = 0
rra[2].cf = "AVERAGE"
rra[2].rows = 4392
rra[2].pdp_per_row = 120
rra[2].xff = 5.0000000000e-01
rra[2].cdp_prep[0].value = 1.0412208000e+03
rra[2].cdp_prep[0].unknown_datapoints = 0
rra[2].cdp_prep[1].value = 3.3233320000e+01
rra[2].cdp_prep[1].unknown_datapoints = 0
rra[2].cdp_prep[2].value = 1.9645834000e+01
rra[2].cdp_prep[2].unknown_datapoints = 0
rra[2].cdp_prep[3].value = 5.9000000000e+00
rra[2].cdp_prep[3].unknown_datapoints = 0
rra[3].cf = "AVERAGE"
rra[3].rows = 1098
rra[3].pdp_per_row = 1440
rra[3].xff = 5.0000000000e-01
rra[3].cdp_prep[0].value = 7.3504437525e+04
rra[3].cdp_prep[0].unknown_datapoints = 0
rra[3].cdp_prep[1].value = 6.2181231118e+03
rra[3].cdp_prep[1].unknown_datapoints = 0
rra[3].cdp_prep[2].value = 4.4994659040e+03
rra[3].cdp_prep[2].unknown_datapoints = 0
rra[3].cdp_prep[3].value = 8.7797240245e+02
rra[3].cdp_prep[3].unknown_datapoints = 0
rra[4].cf = "MAX"
rra[4].rows = 26352
rra[4].pdp_per_row = 5
rra[4].xff = 5.0000000000e-01
rra[4].cdp_prep[0].value = 9.6212500000e+01
rra[4].cdp_prep[0].unknown_datapoints = 0
rra[4].cdp_prep[1].value = 6.6625000000e+00
rra[4].cdp_prep[1].unknown_datapoints = 0
rra[4].cdp_prep[2].value = 5.4833300000e+00
rra[4].cdp_prep[2].unknown_datapoints = 0
rra[4].cdp_prep[3].value = 7.3333300000e-01
rra[4].cdp_prep[3].unknown_datapoints = 0
rra[5].cf = "MAX"
rra[5].rows = 8784
rra[5].pdp_per_row = 30
rra[5].xff = 5.0000000000e-01
rra[5].cdp_prep[0].value = 9.6970800000e+01
rra[5].cdp_prep[0].unknown_datapoints = 0
rra[5].cdp_prep[1].value = 6.6791700000e+00
rra[5].cdp_prep[1].unknown_datapoints = 0
rra[5].cdp_prep[2].value = 5.6000000000e+00
rra[5].cdp_prep[2].unknown_datapoints = 0
rra[5].cdp_prep[3].value = 7.4166700000e-01
rra[5].cdp_prep[3].unknown_datapoints = 0
rra[6].cf = "MAX"
rra[6].rows = 4392
rra[6].pdp_per_row = 120
rra[6].xff = 5.0000000000e-01
rra[6].cdp_prep[0].value = 9.6970800000e+01
rra[6].cdp_prep[0].unknown_datapoints = 0
rra[6].cdp_prep[1].value = 6.6791700000e+00
rra[6].cdp_prep[1].unknown_datapoints = 0
rra[6].cdp_prep[2].value = 5.6000000000e+00
rra[6].cdp_prep[2].unknown_datapoints = 0
rra[6].cdp_prep[3].value = 7.4166700000e-01
rra[6].cdp_prep[3].unknown_datapoints = 0
rra[7].cf = "MAX"
rra[7].rows = 1098
rra[7].pdp_per_row = 1440
rra[7].xff = 5.0000000000e-01
rra[7].cdp_prep[0].value = 9.8075000000e+01
rra[7].cdp_prep[0].unknown_datapoints = 0
rra[7].cdp_prep[1].value = 4.0170800000e+01
rra[7].cdp_prep[1].unknown_datapoints = 0
rra[7].cdp_prep[2].value = 3.0358300000e+01
rra[7].cdp_prep[2].unknown_datapoints = 0
rra[7].cdp_prep[3].value = 2.2837500000e+01
rra[7].cdp_prep[3].unknown_datapoints = 0
rra[8].cf = "MIN"
rra[8].rows = 26352
rra[8].pdp_per_row = 5
rra[8].xff = 5.0000000000e-01
rra[8].cdp_prep[0].value = 8.7120800000e+01
rra[8].cdp_prep[0].unknown_datapoints = 0
rra[8].cdp_prep[1].value = 2.3208300000e+00
rra[8].cdp_prep[1].unknown_datapoints = 0
rra[8].cdp_prep[2].value = 1.0000000000e+00
rra[8].cdp_prep[2].unknown_datapoints = 0
rra[8].cdp_prep[3].value = 4.6666700000e-01
rra[8].cdp_prep[3].unknown_datapoints = 0
rra[9].cf = "MIN"
rra[9].rows = 8784
rra[9].pdp_per_row = 30
rra[9].xff = 5.0000000000e-01
rra[9].cdp_prep[0].value = 8.7120800000e+01
rra[9].cdp_prep[0].unknown_datapoints = 0
rra[9].cdp_prep[1].value = 1.7541700000e+00
rra[9].cdp_prep[1].unknown_datapoints = 0
rra[9].cdp_prep[2].value = 7.2916700000e-01
rra[9].cdp_prep[2].unknown_datapoints = 0
rra[9].cdp_prep[3].value = 4.1666700000e-01
rra[9].cdp_prep[3].unknown_datapoints = 0
rra[10].cf = "MIN"
rra[10].rows = 4392
rra[10].pdp_per_row = 120
rra[10].xff = 5.0000000000e-01
rra[10].cdp_prep[0].value = 8.7120800000e+01
rra[10].cdp_prep[0].unknown_datapoints = 0
rra[10].cdp_prep[1].value = 1.7541700000e+00
rra[10].cdp_prep[1].unknown_datapoints = 0
rra[10].cdp_prep[2].value = 7.2916700000e-01
rra[10].cdp_prep[2].unknown_datapoints = 0
rra[10].cdp_prep[3].value = 4.1666700000e-01
rra[10].cdp_prep[3].unknown_datapoints = 0
rra[11].cf = "MIN"
rra[11].rows = 1098
rra[11].pdp_per_row = 1440
rra[11].xff = 5.0000000000e-01
rra[11].cdp_prep[0].value = 4.2287500000e+01
rra[11].cdp_prep[0].unknown_datapoints = 0
rra[11].cdp_prep[1].value = 1.1125000000e+00
rra[11].cdp_prep[1].unknown_datapoints = 0
rra[11].cdp_prep[2].value = 4.5416700000e-01
rra[11].cdp_prep[2].unknown_datapoints = 0
rra[11].cdp_prep[3].value = 2.5000000000e-01
rra[11].cdp_prep[3].unknown_datapoints = 0



_________________________________________________________________
Feel like a local wherever you go.
http://www.backofmyhand.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/rrd-users/attachments/20071112/98723ba5/attachment-0001.html 


More information about the rrd-users mailing list