[rrd-users] How are --start and --end supposed to behave?

Peter Valdemar Mørch swp5jhu02 at sneakemail.com
Sun Jan 21 22:39:20 MET 2007


Hi there,

Suppose I have an rrd file with step=300 and good data every 5 minutes.

I want "values from the N last samples". What are the right values for 
--start and --end in fetch, graph or xport?

If the time is now 15:08, the last good sample is from
15:00-15:05. So far so good.

Now, the behaviour of rrdtool differs depending on the version
we're using.

In rrdtool version 1.2.11 "-start 15:00 -end 15:00" gives zero
returned rows. Both "--start 15:00 --end 15:05" and "--start
15:00 --end 15:00+1" give one row with a time stamp of
1169388300 which is unixtime for 15:05.

In rrdtool version 1.2.15 both "-start 15:00 -end 15:00" and
"--start 15:00 --end 15:00+1" give one row with a time stamp of
1169388300 which is unixtime for 15:05, while "--start 15:00
--end 15:05" gives two rows, with time stamps 1169388300 and
1169388600: 15:05 and 15:10 (that last one being NaN since the
time is only 15:08)

Because of this, we've started using the "15:00+1" to get around the
version dependency so that 1.2.11 and 1.2.15 behave the same.

I don't see this behavioral change mentioned in the release 
announcements for 1.2.12 and 1.2.15 (what happened to .13 and .14?) and 
so I wonder if this is intentional. It "looks like" a < changed to <= or 
something.

Also, I don't see either behaviour documented anywhere. The closest is 
man rrdfetch, but it doesn't mention how many and what rows to expect 
back given a certain resolution. I'm also assuming that a row with a 
timestamp of t represents the time from t-step to t.

Is this "+1" solution going to work "forever" or are there more changes 
to come? Is there a better way to figure out --start and --end to "get 
the last N samples"?

-- 
Peter Valdemar Mørch
http://www.morch.com

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the rrd-users mailing list