[rrd-users] RRDTool is behaving differently on within a 5 minute sampling boundary?

James Bensley jwbensley at gmail.com
Tue Jul 2 10:10:20 CEST 2013

Hi All,

I use the infamous Cacti [1] graphing suite for graphing systems,
which uses RRD for data storage and graphing. I am generating some
graphs on the CLI and have some odd graphs coming out of rrdtool. I
have been using the following command [2] in a script to generate
graphs happily for a while. I have a problem though in that today I
have generated a graph for a data source which I previously haven't
before. The graph is missing the horizontal red line (for the 95th
percentile value of this data source). The start and end epoch times I
tried are from 2013-04-01 00:00 to 2013-04-30 23:55 to graph the whole
month of April. It turns out that when graphing up until 2013-04-30
12:28 works fine, see this graph [3]. When I graph up until 12:29 (one
minute later!) the graph comes out like this [4]. Graphing up until
any time after 12:29 doesn't include that red horizontal rule either.

How can the graph output be different when the data in the RRD file is
stored in 5 minute timestamped increments, which fall on round
multiples of 5 (12:20, 12:25, 12:30, 12:35...). There is no missing
data sample here, please see [5].

If anyone can explain to me what is going on here I would be very grateful.
Many thanks for your time,

[1] http://www.cacti.net/

[2] sudo /usr/bin/rrdtool graph /path/to/graphs/1111.png
--imgformat=PNG --start=1364770800 --end=1367321280 --title='My-Graph'
--rigid --base=1000 --height=120 --width=500 --alt-autoscale-max
--lower-limit=0 --vertical-label='bits per second' --slope-mode --font
TITLE:10: --font AXIS:8: --font LEGEND:7: --font UNIT:8:
VDEF:inbytesavg=in,AVERAGE VDEF:outbytesavg=out,AVERAGE
CDEF:outbytesmod=out,UN,outbytesavg,out,IF CDEF:speedin=in,8,*
CDEF:speedout=out,8,* VDEF:intotal=inbytesmod,TOTAL
VDEF:outtotal=outbytesmod,TOTAL AREA:speedin#00CF00FF:"Inbound"
GPRINT:speedin:LAST:"Current\:%8.2lf %s"
GPRINT:speedin:AVERAGE:"Average\:%8.2lf %s"
GPRINT:speedin:MAX:"Maximum\:%8.2lf %s"  GPRINT:intotal:"Total
In\:%8.2lf %s" COMMENT:" \c" LINE1:speedout#002A97FF:"Outbound"
GPRINT:speedout:LAST:"Current\:%8.2lf %s"
GPRINT:speedout:AVERAGE:"Average\:%8.2lf %s"
GPRINT:speedout:MAX:"Maximum\:%8.2lf %s"  GPRINT:outtotal:"Total
Out\:%8.2lf %s \c" COMMENT:" \c" HRULE:9580147#FF0000FF:"95th
Percentile" COMMENT:"(9.58 mbit in+out)\c" PRINT:intotal:"%8.2lf%SBs
In" PRINT:outtotal:"%8.2lf%SBs Out" PRINT:speedin:AVERAGE:"%8.2lf%sbps
In" PRINT:speedout:AVERAGE:"%8.2lf%sbps Out"
PRINT:speedin:MAX:"%8.2lf%sbps In" PRINT:speedout:MAX:"%8.2lf%sbps

[3] http://oi44.tinypic.com/2ep5vl2.jpg

[4] http://oi41.tinypic.com/dx0fsz.jpg

[5] $ sudo rrdtool fetch /path/to/rrds/lala.rrd -s 1367320800 -e
1367321400  AVERAGE
                     traffic_in         traffic_out

1367321100: 7.8530783986e+04 2.1480852477e+05
1367321400: 7.4297887604e+04 2.4740713005e+05
1367321700: 9.0767816984e+04 2.7918390929e+05

More information about the rrd-users mailing list