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

Ole Holm Nielsen Ole.H.Nielsen at fysik.dtu.dk
Thu Feb 26 15:24:03 CET 2009


Alex van den Bogaerdt wrote:
> 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.

Thanks a lot for your tutorials and explanation!  This is most enlightening.
It's beginning to dawn upon me that the RRD databases always use UTC internally.

The problem I'm seeing is that when I create a database that starts on
Tue 01 Jan 2002 12:00:00 AM CET (New Year in my local timezone):

# rrdtool create test.rrd --start 1009839600 --step 86400 \
   DS:running:GAUGE:86400:0:U RRA:AVERAGE:0.5:1:3650

then internally rrdtool doesn't do what I intended, since it seems to shift
the timestamps from 00:00:00 CET to 01:00:00 CET = 00:00:00 UTC:

# rrdtool dump test.rrd
...
   <database>
      <!-- 1992-01-04 01:00:00 CET / 694483200 --> <row><v> NaN </v></row>
...

The quick answer is presumably that this shows rrdtool working as designed!?

However, I do NOT want to look at midnight to midnight UTC time, I really
must look at midnight to midnight local time!  The reason for this requirement
is that our Linux cluster, which operates with the Torque Resource Manager
(a batch job system), generates daily accounting files in *local time*, i.e.,
for each day in local time a file is created named like "20090226".
So the natural period of time for my system is from 00:00:00 until 23:59:59
local time, not UTC time (please do not suggest to fix the Torque software
to use UTC!).

I would still love to hear any suggestions on of how to use *local time* with
an RRD database, when the natural time step is 86400 seconds starting at
00:00:00 local time.  Do I need to use a 3600 seconds timestep in the RRD
and then average over 24 daily steps in local time ?  Explicit command examples
would be much appreciated since I am an rrdtool newbie.

Thanks a lot,
Ole

-- 
Ole Holm Nielsen
Department of Physics, Technical University of Denmark



More information about the rrd-users mailing list