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

Ole Holm Nielsen Ole.H.Nielsen at fysik.dtu.dk
Wed Feb 25 22:17:56 CET 2009


I'm a newbie rrdtool user, using rrdtool-1.2.29 for storing accounting
data from our Linux cluster: Every day after midnight I get resource
usage numbers for user groups that were accumulated from the previous day.

My rrdtool setup is working *almost* as I want it, but the
really annoying thing that's driving me crazy is that my
rrdtool graph is always missing the very last data point !
No matter how I play with --start and --end, under no
circumstances can I get the last data point out !!

Question: How do I get the last datapoint into the rrdtool graph ?

This may be a FAQ, and I've really been trying to study the
rrdtool documentation, but the solution has yet to be found !

FYI, my RRD configuration is as follows:  I want to store daily accounting
data for about 10 years, and this is excerpts from my shell scripts:

# Define the earliest possible time (01/01 2002):
STARTTIME=`$AWK 'BEGIN {print mktime("2002 01 01 00 00 00")}'`
STEPTIME=86400
HEARTBEAT=$[$STEPTIME*2]
$RRDTOOL create $RRDDB \
         --start $STARTTIME --step $STEPTIME \
         DS:running:GAUGE:$HEARTBEAT:0:U \
         DS:DCSC:GAUGE:$HEARTBEAT:0:U \
         DS:LOCAL:GAUGE:$HEARTBEAT:0:U \
         RRA:AVERAGE:0.5:1:3650 \
         RRA:AVERAGE:0.5:7:500 \

I then load several years of accounting data, the timestamp of each
"rrdtool update" is set to be 23:59:59 on the given day (day,month,year).

Now I want to create a graph for the past week, say, by basically this command:

$RRDTOOL graph $graphfile --end $last --start $starttime \
                 DEF:running=$RRDDB:running:AVERAGE \
                 AREA:running$colour_running:"$text_running"

But no matter what guesses I make for $last and $starttime,
the last day is always missing !

The data point seems to be in there allright:
# rrdtool lastupdate some-database.rrd
  running DCSC LOCAL

1235516399: 1356.471760 884 343
where the timestamp translates into Tue 24 Feb 2009 11:59:59 PM CET.
But the last point in the graph corresponds to Monday 23 Feb !

Question 2: What am I doing wrong in the above database definitions,
and how should I create the database so that it'll support my needs ?

Thanks a lot,
Ole H. Nielsen
Dept. of Physics, Technical University of Denmark




More information about the rrd-users mailing list