[rrd-users] Question about RRDTool ..

Jean-Yves Avenard jyavenard at gmail.com
Thu Mar 20 18:34:23 CET 2008


Hi

On Fri, Mar 21, 2008 at 1:00 AM, Simon Hobson <linux at thehobsons.co.uk> wrote:
>  rrdtool graph ... -s ${Start} -e ${End} -w ${Pixels} ...
>

This would show 400*5 minutes worth of data.

Ok...

I'm a bit confused with how RRDtool calculate the data quite frankly.

In another example, I collect data every minute. The data is discrete.
I made sure the data is entered using timestamps that are a multiple of 60.

Using rrdtool fetch data.rrd AVERAGE, I can see the data as I've
entered it for every minute.
However, when I draw my graph like this:

rrdtool graph images/speedday.png -l 0 \
-t 'Sync Speed - DAILY' \
--step 60 --end 1206032280 --start 1206003420 \
-x HOUR:1:HOUR:4:HOUR:2:0:%k \
DEF:maxdown=modem.rrd:maxdown:AVERAGE \
    VDEF:ds2max=maxdown,MAXIMUM \
    VDEF:ds2avg=maxdown,AVERAGE \
    VDEF:ds2min=maxdown,MINIMUM \
    VDEF:ds2pct=maxdown,LAST \
 COMMENT:'            ' \
 COMMENT:'Maximum   ' \
    COMMENT:'Average   ' \
    COMMENT:'Minimum   '  \
    COMMENT:'Last Value\l' \
    LINE1:maxdown#00F000:'Max In. ' \
    GPRINT:ds2max:'%5.0lf kb/s' \
    GPRINT:ds2avg:'%5.0lf kb/s' \
    GPRINT:ds2min:'%5.0lf kb/s' \
    GPRINT:ds2pct:'  %5.0lf kb/s\l' \

When I run rrdtool fetch AVERAGE, I can see all my data, and I see
that the minimum value is 13940.
However, in the graph, it tells me that the minimum value is 13948.
Same for the maximum, looking at the data returned by fetch, it should
be 14048, but in the graph it shows 14036.

Both value 13940 and 14036 exists in the list of data, but why would
those values be used for the minimum and maximum when they obviously
aren't ?

The RRD table was created using:
rrdtool create modem.rrd -s 60 \
DS:maxdown:GAUGE:600:0:22000 \
RRA:AVERAGE:0.5:1:527040 \
RRA:AVERAGE:0.5:60:744 \
RRA:AVERAGE:0.5:10080:4 \
RRA:AVERAGE:0.5:44640:12 \
RRA:MIN:0.5:1:527040 \
RRA:MIN:0.5:60:744 \
RRA:MIN:0.5:10080:4 \
RRA:MIN:0.5:44640:12 \
RRA:MAX:0.5:1:527040 \
RRA:MAX:0.5:60:744 \
RRA:MAX:0.5:10080:4 \
RRA:MAX:0.5:44640:12

Thank you
Jean-Yves



More information about the rrd-users mailing list