Hi to all,
I'm having some problems with fetch. It just doesn't seem to get things
right as far as "start" and "end" arguments are concerned. I'm kinda
newbie in rrdtool so I hope I'm not missing something here. Anyway, here
goes: I'm trying to fetch some values from an rrd file with step set to
1. Here's what I get for the 1201849690 to 1201849693 time series:
$ rrdtool fetch lights_corridor.rrd LAST \
-s 1201849690 -e 1201849693
main
1201849691: 0.0000000000e+00
1201849692: 0.0000000000e+00
1201849693: 0.0000000000e+00
1201849694: 0.0000000000e+00
It seems that rrdtool adds a second to both "start" and "end", so I get
values for the 1201849691 to 1201849694 time series. anyway, using fetch
from the Python bindings I get even more weird results:
>>> rrdtool.fetch("lights_corridor.rrd", "LAST", 1201849690,1201849693)
((1201849690, 1201849694, 1), ('main',), [(0.0,), (0.0,), (0.0,),
(0.0,), (-9.5644785903411794e-40,)])
^^^^^^^^^^^^^^^^^^^^^^^^^^
This last value seems to have come from nowhere:
$ rrdtool fetch lights_corridor.rrd LAST \
-s 1201849690 -e 1201849696
main
1201849691: 0.0000000000e+00
1201849692: 0.0000000000e+00
1201849693: 0.0000000000e+00
1201849694: 0.0000000000e+00
1201849695: 1.0000000000e+00
1201849696: nan
1201849697: nan
And the dump tool says: ::
<!-- Round Robin Database Dump --><rrd> <version> 0003 </version>
<step> 1 </step> <!-- Seconds -->
<lastupdate> 1201849695 </lastupdate> <!-- 2008-02-01 09:08:15
EET -->
<ds>
<name> main </name>
<type> GAUGE </type>
<minimal_heartbeat> 86400 </minimal_heartbeat>
<min> 0.0000000000e+00 </min>
<max> 1.0000000000e+00 </max>
<!-- PDP Status -->
<last_ds> UNKN </last_ds>
<value> 0.0000000000e+00 </value>
<unknown_sec> 0 </unknown_sec>
</ds>
<!-- Round Robin Archives -->
[...]
<cf> LAST </cf>
<pdp_per_row> 1 </pdp_per_row> <!-- 1 seconds -->
<params>
<xff> 5.0000000000e-01 </xff>
</params>
<cdp_prep>
<ds>
<primary_value> 1.0000000000e+00 </primary_value>
<secondary_value> 0.0000000000e+00
</secondary_value>
<value> NaN </value>
<unknown_datapoints> 0 </unknown_datapoints>
</ds>
</cdp_prep>
<database>
<!-- 2008-01-25 09:08:16 EET / 1201244896 -->
<row><v> NaN </v></row>
<!-- 2008-01-25 09:08:17 EET / 1201244897 -->
<row><v> NaN </v></row>
[...]
<!-- 2008-02-01 09:08:10 EET / 1201849690 -->
<row><v> 0.0000000000e+00 </v></row>
<!-- 2008-02-01 09:08:11 EET / 1201849691 -->
<row><v> 0.0000000000e+00 </v></row>
<!-- 2008-02-01 09:08:12 EET / 1201849692 -->
<row><v> 0.0000000000e+00 </v></row>
<!-- 2008-02-01 09:08:13 EET / 1201849693 -->
<row><v> 0.0000000000e+00 </v></row>
<!-- 2008-02-01 09:08:14 EET / 1201849694 -->
<row><v> 0.0000000000e+00 </v></row>
<!-- 2008-02-01 09:08:15 EET / 1201849695 -->
<row><v> 1.0000000000e+00 </v></row>
</database>
</rra>
</rrd>
I've made my test with both versions 1.2.19 (default in Ubuntu gutsy)
and 1.2.26 having the same exact results. Can anybody please shed some
light here? Is this a bug or am I getting something completely wrong?
Thank you in advance,
~dkart
_______________________________________________
rrd-users mailing list
[email protected]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users