[rrd-users] rrd fetch changes between 1.0 and 1.2

Alex van den Bogaerdt alex at ergens.op.het.net
Fri Feb 2 15:14:46 CET 2007


On Fri, Feb 02, 2007 at 02:42:23PM +0100, Gergely Madarasz wrote:

> # rrdtool fetch some.rrd AVERAGE --start 1170422400 --end 1170423300

What do you ask here:

You ask for time range starting at 1170422400 and ending at 1170423300.
This is 1170423300-1170422400=900 seconds.

> timestamp    42
> 
> 1170422400:  1.0666666667e-03
> 1170422700:  2.6133333333e-02
> 1170423000:  1.0471937984e-01
> 1170423300:  2.6379611625e-01

What did you get: the range between 1170422400-300 (!!!) and 1170423300.
This is 1200 seconds.

The interval marked "1170422400" is the one ending at 1170422400, not
starting at 1170422400.

This bug was fixed a long time ago.  For a while, 1.2 gave the correct
result (three lines, 900 seconds: 1170422700, 1170423000 and 1170423300).

Unfortunately a new bug has surfaced.  This was discussed a couple of
days ago (21 and 22 January)
Topic: "How are --start and --end supposed to behave?"

1170422400:  1170422100 to 1170422400      Wrong, with 1.0
1170422700:  1170422400 to 1170422700       Good \
1170423000:  1170423700 to 1170423000       Good  > 1170422400..1170423300
1170423300:  1170423000 to 1170423300       Good /
1170423600:  1170423300 to 1170423600      Wrong, with current 1.2

> So 1.0 actually gives data corresponding to the interval asked in the
> command line, while 1.2 gives an off-by-one result.

I hope you now understand that this is not true.

HTH
-- 
Alex van den Bogaerdt
http://www.vandenbogaerdt.nl/rrdtool/



More information about the rrd-users mailing list