[rrd-users] Odd mismatch in fetch results (via Perl/CLI)
Marco Marongiu
brontolinux at gmail.com
Fri Jan 7 10:50:30 CET 2011
Hello
Thanks to those who replied. An all-in-one reply follows.
Tobias Oetiker:
> note you may be using two different version of rrdtool ... there
> were changes the in the number of entries returned from fetch ...
It IS different, I am running 1.3.1 on the server that collects the
statistics (Debian Lenny package), and 1.3.8 on the reporting side
(Ubuntu 10.04.1 package). But I compared the output, and they are
exactly the same except for NaNs appearing as "nan" in 1.3.1 and "-nan"
in 1.3.8. Removing the dash from 1.3.8's output made them exactly the same.
That's why I think there is something strange when the data is fetched
through Perl and RRDs, but I really can't find what.
Steve Shipway:
> Can you post the structure of your RRD file -- IE, what parameters
> are used to create it, or an 'rrdtool info' dump if this is not
> available.
"rrdtool info" pasted at the bottom of the message.
Alex van den Bogaerdt:
> According to http://www.onlineconversion.com/unix_time.htm
> 1291158000 is 23:00 UTC.
> http://www.epochconverter.com/ agrees.
>
> You expected midnight UTC here?
Yep. As you can see from the perl call that "stringifies" the timestamp:
> @$timestamps =
> map { scalar gmtime( $start + $_ * $step ) } (0..$#$data) ;
And it actually does it for all the aggregated RRD files:
> Wed Dec 1 00:00:00 2010 10,61
> Wed Dec 1 01:00:00 2010 10,61
> Wed Dec 1 02:00:00 2010 10,34
but that one:
> Tue Nov 30 23:05:00 2010
> Tue Nov 30 23:10:00 2010
> Tue Nov 30 23:15:00 2010
Any ideas?
Ciao
--bronto
---------------------------------------------------------------------------
OUTPUT FROM rrdtool info[*]:
on the server where statistics are collected:
rrd_version = "0003"
step = 60
last_update = 1294226282
ds[x3].type = "GAUGE"
ds[x3].minimal_heartbeat = 120
ds[x3].min = 0.0000000000e+00
ds[x3].max = NaN
ds[x3].last_ds = "0.090476"
ds[x3].value = 2.4080811684e-01
ds[x3].unknown_sec = 0
ds[x4].type = "GAUGE"
ds[x4].minimal_heartbeat = 120
ds[x4].min = 0.0000000000e+00
ds[x4].max = NaN
ds[x4].last_ds = "0.084127"
ds[x4].value = 2.2390981526e-01
ds[x4].unknown_sec = 0
ds[x5].type = "GAUGE"
ds[x5].minimal_heartbeat = 120
ds[x5].min = 0.0000000000e+00
ds[x5].max = NaN
ds[x5].last_ds = "0.082539"
ds[x5].value = 2.1968324369e-01
ds[x5].unknown_sec = 0
ds[x6].type = "GAUGE"
ds[x6].minimal_heartbeat = 120
ds[x6].min = 0.0000000000e+00
ds[x6].max = NaN
ds[x6].last_ds = "0.079365"
ds[x6].value = 2.1123542369e-01
ds[x6].unknown_sec = 0
ds[y3].type = "GAUGE"
ds[y3].minimal_heartbeat = 120
ds[y3].min = 0.0000000000e+00
ds[y3].max = NaN
ds[y3].last_ds = "0.087302"
ds[y3].value = 2.3236029684e-01
ds[y3].unknown_sec = 0
ds[y4].type = "GAUGE"
ds[y4].minimal_heartbeat = 120
ds[y4].min = 0.0000000000e+00
ds[y4].max = NaN
ds[y4].last_ds = "0.071429"
ds[y4].value = 1.9011321210e-01
ds[y4].unknown_sec = 0
ds[y5].type = "GAUGE"
ds[y5].minimal_heartbeat = 120
ds[y5].min = 0.0000000000e+00
ds[y5].max = NaN
ds[y5].last_ds = "0.120635"
ds[y5].value = 3.2107837632e-01
ds[y5].unknown_sec = 0
ds[y6].type = "GAUGE"
ds[y6].minimal_heartbeat = 120
ds[y6].min = 0.0000000000e+00
ds[y6].max = NaN
ds[y6].last_ds = "0.082540"
ds[y6].value = 2.1968590526e-01
ds[y6].unknown_sec = 0
ds[aggregate].type = "COMPUTE"
ds[aggregate].cdef =
"x3,x4,x5,x6,y3,y4,y5,y6,ADDNAN,ADDNAN,ADDNAN,ADDNAN,ADDNAN,ADDNAN,ADDNAN"
ds[aggregate].last_ds = "U"
ds[aggregate].value = NaN
ds[aggregate].unknown_sec = 2
rra[0].cf = "MIN"
rra[0].rows = 8928
rra[0].cur_row = 4205
rra[0].pdp_per_row = 5
rra[0].xff = 8.0000000000e-01
rra[0].cdp_prep[0].value = 9.0577927342e-02
rra[0].cdp_prep[0].unknown_datapoints = 0
rra[0].cdp_prep[1].value = 6.3492000000e-02
rra[0].cdp_prep[1].unknown_datapoints = 0
rra[0].cdp_prep[2].value = 8.2539000000e-02
rra[0].cdp_prep[2].unknown_datapoints = 0
rra[0].cdp_prep[3].value = 7.9313591463e-02
rra[0].cdp_prep[3].unknown_datapoints = 0
rra[0].cdp_prep[4].value = 7.9467849468e-02
rra[0].cdp_prep[4].unknown_datapoints = 0
rra[0].cdp_prep[5].value = 6.8356849468e-02
rra[0].cdp_prep[5].unknown_datapoints = 0
rra[0].cdp_prep[6].value = 1.1752472537e-01
rra[0].cdp_prep[6].unknown_datapoints = 0
rra[0].cdp_prep[7].value = 8.2436182925e-02
rra[0].cdp_prep[7].unknown_datapoints = 0
rra[0].cdp_prep[8].value = 6.8566255907e-01
rra[0].cdp_prep[8].unknown_datapoints = 0
rra[1].cf = "MAX"
rra[1].rows = 8928
rra[1].cur_row = 2454
rra[1].pdp_per_row = 5
rra[1].xff = 8.0000000000e-01
rra[1].cdp_prep[0].value = 1.0296930106e-01
rra[1].cdp_prep[0].unknown_datapoints = 0
rra[1].cdp_prep[1].value = 8.3872197695e-02
rra[1].cdp_prep[1].unknown_datapoints = 0
rra[1].cdp_prep[2].value = 9.0630225612e-02
rra[1].cdp_prep[2].unknown_datapoints = 0
rra[1].cdp_prep[3].value = 8.2482047131e-02
rra[1].cdp_prep[3].unknown_datapoints = 0
rra[1].cdp_prep[4].value = 8.7302000000e-02
rra[1].cdp_prep[4].unknown_datapoints = 0
rra[1].cdp_prep[5].value = 7.1378020277e-02
rra[1].cdp_prep[5].unknown_datapoints = 0
rra[1].cdp_prep[6].value = 1.2063500000e-01
rra[1].cdp_prep[6].unknown_datapoints = 0
rra[1].cdp_prep[7].value = 8.4069047131e-02
rra[1].cdp_prep[7].unknown_datapoints = 0
rra[1].cdp_prep[8].value = 6.9836202028e-01
rra[1].cdp_prep[8].unknown_datapoints = 0
rra[2].cf = "AVERAGE"
rra[2].rows = 8928
rra[2].cur_row = 6227
rra[2].pdp_per_row = 5
rra[2].xff = 8.0000000000e-01
rra[2].cdp_prep[0].value = 2.8142858006e-01
rra[2].cdp_prep[0].unknown_datapoints = 0
rra[2].cdp_prep[1].value = 2.3257417575e-01
rra[2].cdp_prep[1].unknown_datapoints = 0
rra[2].cdp_prep[2].value = 2.5110196384e-01
rra[2].cdp_prep[2].unknown_datapoints = 0
rra[2].cdp_prep[3].value = 2.4283628986e-01
rra[2].cdp_prep[3].unknown_datapoints = 0
rra[2].cdp_prep[4].value = 2.5684080440e-01
rra[2].cdp_prep[4].unknown_datapoints = 0
rra[2].cdp_prep[5].value = 2.1099533566e-01
rra[2].cdp_prep[5].unknown_datapoints = 0
rra[2].cdp_prep[6].value = 3.5867885613e-01
rra[2].cdp_prep[6].unknown_datapoints = 0
rra[2].cdp_prep[7].value = 2.4919899475e-01
rra[2].cdp_prep[7].unknown_datapoints = 0
rra[2].cdp_prep[8].value = 2.0836550005e+00
rra[2].cdp_prep[8].unknown_datapoints = 0
On the server where reports are created (rrd file rebuilt from XML dump):
rrd_version = "0003"
step = 60
last_update = 1294227962
ds[x3].type = "GAUGE"
ds[x3].minimal_heartbeat = 120
ds[x3].min = 0.0000000000e+00
ds[x3].max = NaN
ds[x3].last_ds = "0.092063"
ds[x3].value = 2.0095981161e-01
ds[x3].unknown_sec = 0
ds[x4].type = "GAUGE"
ds[x4].minimal_heartbeat = 120
ds[x4].min = 0.0000000000e+00
ds[x4].max = NaN
ds[x4].last_ds = "0.088889"
ds[x4].value = 1.9403144254e-01
ds[x4].unknown_sec = 0
ds[x5].type = "GAUGE"
ds[x5].minimal_heartbeat = 120
ds[x5].min = 0.0000000000e+00
ds[x5].max = NaN
ds[x5].last_ds = "0.082539"
ds[x5].value = 1.8017033869e-01
ds[x5].unknown_sec = 0
ds[x6].type = "GAUGE"
ds[x6].minimal_heartbeat = 120
ds[x6].min = 0.0000000000e+00
ds[x6].max = NaN
ds[x6].last_ds = "0.074603"
ds[x6].value = 1.6284723315e-01
ds[x6].unknown_sec = 0
ds[y3].type = "GAUGE"
ds[y3].minimal_heartbeat = 120
ds[y3].min = 0.0000000000e+00
ds[y3].max = NaN
ds[y3].last_ds = "0.109524"
ds[y3].value = 2.3907457292e-01
ds[y3].unknown_sec = 0
ds[y4].type = "GAUGE"
ds[y4].minimal_heartbeat = 120
ds[y4].min = 0.0000000000e+00
ds[y4].max = NaN
ds[y4].last_ds = "0.063491"
ds[y4].value = 1.3859139284e-01
ds[y4].unknown_sec = 0
ds[y5].type = "GAUGE"
ds[y5].minimal_heartbeat = 120
ds[y5].min = 0.0000000000e+00
ds[y5].max = NaN
ds[y5].last_ds = "0.096825"
ds[y5].value = 2.1135454807e-01
ds[y5].unknown_sec = 0
ds[y6].type = "GAUGE"
ds[y6].minimal_heartbeat = 120
ds[y6].min = 0.0000000000e+00
ds[y6].max = NaN
ds[y6].last_ds = "0.077778"
ds[y6].value = 1.6977778508e-01
ds[y6].unknown_sec = 0
ds[aggregate].type = "COMPUTE"
ds[aggregate].cdef =
"x3,x4,x5,x6,y3,y4,y5,y6,ADDNAN,ADDNAN,ADDNAN,ADDNAN,ADDNAN,ADDNAN,ADDNAN"
ds[aggregate].last_ds = "U"
ds[aggregate].value = NaN
ds[aggregate].unknown_sec = 2
rra[0].cf = "MIN"
rra[0].rows = 8928
rra[0].cur_row = 3004
rra[0].pdp_per_row = 5
rra[0].xff = 8.0000000000e-01
rra[0].cdp_prep[0].value = 9.2320513032e-02
rra[0].cdp_prep[0].unknown_datapoints = 0
rra[0].cdp_prep[1].value = 8.8831144249e-02
rra[0].cdp_prep[1].unknown_datapoints = 0
rra[0].cdp_prep[2].value = 7.4718711503e-02
rra[0].cdp_prep[2].unknown_datapoints = 0
rra[0].cdp_prep[3].value = 7.4603000000e-02
rra[0].cdp_prep[3].unknown_datapoints = 0
rra[0].cdp_prep[4].value = 1.0135554054e-01
rra[0].cdp_prep[4].unknown_datapoints = 0
rra[0].cdp_prep[5].value = 6.3748472478e-02
rra[0].cdp_prep[5].unknown_datapoints = 0
rra[0].cdp_prep[6].value = 9.6953756516e-02
rra[0].cdp_prep[6].unknown_datapoints = 0
rra[0].cdp_prep[7].value = 7.7662252041e-02
rra[0].cdp_prep[7].unknown_datapoints = 0
rra[0].cdp_prep[8].value = 6.8553932338e-01
rra[0].cdp_prep[8].unknown_datapoints = 0
rra[1].cf = "MAX"
rra[1].rows = 8928
rra[1].cur_row = 5616
rra[1].pdp_per_row = 5
rra[1].xff = 8.0000000000e-01
rra[1].cdp_prep[0].value = 9.8123648331e-02
rra[1].cdp_prep[0].unknown_datapoints = 0
rra[1].cdp_prep[1].value = 8.8889000000e-02
rra[1].cdp_prep[1].unknown_datapoints = 0
rra[1].cdp_prep[2].value = 8.2217169540e-02
rra[1].cdp_prep[2].unknown_datapoints = 0
rra[1].cdp_prep[3].value = 7.4718711503e-02
rra[1].cdp_prep[3].unknown_datapoints = 0
rra[1].cdp_prep[4].value = 1.0920212899e-01
rra[1].cdp_prep[4].unknown_datapoints = 0
rra[1].cdp_prep[5].value = 7.0245063172e-02
rra[1].cdp_prep[5].unknown_datapoints = 0
rra[1].cdp_prep[6].value = 9.9884252041e-02
rra[1].cdp_prep[6].unknown_datapoints = 0
rra[1].cdp_prep[7].value = 7.7778000000e-02
rra[1].cdp_prep[7].unknown_datapoints = 0
rra[1].cdp_prep[8].value = 6.8571204055e-01
rra[1].cdp_prep[8].unknown_datapoints = 0
rra[2].cf = "AVERAGE"
rra[2].rows = 8928
rra[2].cur_row = 8784
rra[2].pdp_per_row = 5
rra[2].xff = 8.0000000000e-01
rra[2].cdp_prep[0].value = 9.2320513032e-02
rra[2].cdp_prep[0].unknown_datapoints = 0
rra[2].cdp_prep[1].value = 8.8889000000e-02
rra[2].cdp_prep[1].unknown_datapoints = 0
rra[2].cdp_prep[2].value = 8.2217169540e-02
rra[2].cdp_prep[2].unknown_datapoints = 0
rra[2].cdp_prep[3].value = 7.4603000000e-02
rra[2].cdp_prep[3].unknown_datapoints = 0
rra[2].cdp_prep[4].value = 1.0920212899e-01
rra[2].cdp_prep[4].unknown_datapoints = 0
rra[2].cdp_prep[5].value = 6.3748472478e-02
rra[2].cdp_prep[5].unknown_datapoints = 0
rra[2].cdp_prep[6].value = 9.6953756516e-02
rra[2].cdp_prep[6].unknown_datapoints = 0
rra[2].cdp_prep[7].value = 7.7778000000e-02
rra[2].cdp_prep[7].unknown_datapoints = 0
rra[2].cdp_prep[8].value = 6.8571204055e-01
rra[2].cdp_prep[8].unknown_datapoints = 0
[*] NOTE: filename is omitted, and data source names are anonymized
More information about the rrd-users
mailing list