[rrd-users] rrdtool fetch with computed resolution

xavidpr4 foxybcn at hotmail.com
Mon Mar 14 14:11:28 CET 2011


Hi,

I think he is asking why if he request a 30s resolution, the rrdtool output
is 10s resolution and not 30s if 30s is multiple of the start time and end
time. 

I just have the same "bug". These is my rrd database info (see at the bottom
of reply). I store a sample every minute and then for every 15 samples I
store another one, so an average sample is stored every 15min/900s, isn't
it?

And I want to extract from de database 720 samples of the last two days, so
if in two days there are 2880 samples of 1minunte/60s: 2880/720= 4. 
I should use 240 of resolution (60x4=240s to get 720 samples in two days).
It seems very easy but it isn't working and i don't understand why.

rrdtool fetch database.rrd AVERAGE -r 240 -s 1299672960 -e 1299845760

The command above outputs me 2880 samples which are each one stored every
minute during the 2days interval.

I tried to use the solution given on the documentation rrdtool fetch page
but neither is working, it also outputs me 2880 results instead of 720. Look
i'm using a start and end time multiple of 240.

TIME=1299845760
RRDRES=240
rrdtool fetch database.rrd AVERAGE -r $RRDRES -e $(($TIME/$RRDRES*$RRDRES))
-s 1299672960

Could anyone explain me what i'm not doing well? Or maybe it is not
possible?

Thank you very much.

Regards.
Xavier.

RRD DB INFO:

filename = "database.rrd"
rrd_version = "0003"
step = 60
last_update = 1300104363
header_size = 2764
ds[ds1].index = 0
ds[ds1].type = "COUNTER"
ds[ds1].minimal_heartbeat = 180
ds[ds1].min = 0.0000000000e+00
ds[ds1].max = 1.2500000000e+07
ds[ds1].last_ds = "4197984233"
ds[ds1].value = 1.8098835251e+06
ds[ds1].unknown_sec = 0
ds[ds2].index = 1
ds[ds2].type = "COUNTER"
ds[ds2].minimal_heartbeat = 180
ds[ds2].min = 0.0000000000e+00
ds[ds2].max = 1.2500000000e+07
ds[ds2].last_ds = "1946349096"
ds[ds2].value = 9.8436039122e+05
ds[ds2].unknown_sec = 0
rra[0].cf = "AVERAGE"
rra[0].rows = 225000
rra[0].cur_row = 78456
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[1].cf = "AVERAGE"
rra[1].rows = 60000
rra[1].cur_row = 57228
rra[1].pdp_per_row = 15
rra[1].xff = 5.0000000000e-01
rra[1].cdp_prep[0].value = 2.9175424566e+06
rra[1].cdp_prep[0].unknown_datapoints = 0
rra[1].cdp_prep[1].value = 2.8180050584e+06
rra[1].cdp_prep[1].unknown_datapoints = 0
rra[2].cf = "AVERAGE"
rra[2].rows = 20000
rra[2].cur_row = 9797
rra[2].pdp_per_row = 60
rra[2].xff = 5.0000000000e-01
rra[2].cdp_prep[0].value = 2.9175424566e+06
rra[2].cdp_prep[0].unknown_datapoints = 0
rra[2].cdp_prep[1].value = 2.8180050584e+06
rra[2].cdp_prep[1].unknown_datapoints = 0
rra[3].cf = "AVERAGE"
rra[3].rows = 10000
rra[3].cur_row = 7454
rra[3].pdp_per_row = 720
rra[3].xff = 5.0000000000e-01
rra[3].cdp_prep[0].value = 2.9175424566e+06
rra[3].cdp_prep[0].unknown_datapoints = 0
rra[3].cdp_prep[1].value = 2.8180050584e+06
rra[3].cdp_prep[1].unknown_datapoints = 0


--
View this message in context: http://rrd-mailinglists.937164.n2.nabble.com/rrdtool-fetch-with-computed-resolution-tp1072059p6168979.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.



More information about the rrd-users mailing list