[rrd-users] Newbie question: Always missing the last datapoint in rrdtool graphs

Alex van den Bogaerdt alex at vandenbogaerdt.nl
Thu Feb 26 13:51:54 CET 2009


because that's the natural reading order!
why?
can you please reply below what you are replying to?

----- Original Message ----- 
From: "Ole Holm Nielsen" <Ole.H.Nielsen at fysik.dtu.dk>
To: "Leonard Mills" <lenm at ops.corpnet.sel.sony.com>
Cc: <rrd-users at lists.oetiker.ch>
Sent: Thursday, February 26, 2009 1:26 PM
Subject: Re: [rrd-users] Newbie question: Always missing the last 
datapoint in rrdtool graphs


> Hi Len,
>
> I'm pleased to hear that it's possible to map daily 24-hour data 
> into a
> single timestep in an RRD database.  Being an rrdtool newbie I'm 
> unsure
> how to get the timestampts *exactly* right for 24-hour data, so I 
> wonder
> if you or someone else could show me example commands like:
>    rrdtool create $RRDDB --start $STARTTIME --step $STEPTIME ...
>    rrdtool update $RRDDB timestamp...
>    rrdtool graph $RRDDB --end $last --start $starttime ...
>
> For the "update", which timestamp value must be chosen: 00:00:00 or
> 24:00:00 = 00:00:00 next day ?

Updates are describing the past: 
http://www.vandenbogaerdt.nl/rrdtool/after_the_fact.php

More info on UTC: http://www.vandenbogaerdt.nl/rrdtool/timezone.php

Most people don't look at midnight to midnight local time. They look 
at midnight to midnight UTC time.
You may also want to look at: 
http://www.vandenbogaerdt.nl/rrdtool/summertime.php

> For the "graph", what are magic start and end values that will 
> produce
> a nice daily graph ?

Think in pixel columns and in RRA rows. Each rate (each RRA row) on a 
whole amount of pixel columns produces the least amount of surprises.

See http://www.vandenbogaerdt.nl/rrdtool/process.php for some more 
information on consolidation. What you need to know is how much time 
is in each RRA row. With a step size of 86400 seconds and 1 step per 
row, each RRA row is 86400 seconds.  One year (=365 or 366 days) then 
fits nicely on a 365 or 366 pixel wide graph.  Specify the end time in 
UTC as 1230768000. This number can be divided by 86400 without a 
remainder, thus n*86400 where n is an integer. I got it like so: 
date -ud 2009-01-01\ 00:00 +%s
Then specify start as "--start end-31536000". This number is 
365*86400.



More information about the rrd-users mailing list