[rrd-users] CDEF Help

Rod Rod at Rods.id.au
Sat Jun 1 05:31:54 CEST 2013


     Hi,

     I have asked this question once before, and I'm still having a 
problem with the result..

     I am trying to output the rain over a time period.

rrdtool graph /var/www/localhost/htdocs/rrdtool/rain-D.png \
-A -s -1d -h 200 -w 500 \
-t "House Outside Rain (Day)" \
-v "mm" \
DEF:R24h_line=/var/lib/rrd/int-ext-temp.rrd:R24h:AVERAGE \
DEF:rain_avg=/var/lib/rrd/int-ext-temp.rrd:R24h:AVERAGE \
DEF:rain_max=/var/lib/rrd/int-ext-temp.rrd:R24h:MAX \
DEF:rain_min=/var/lib/rrd/int-ext-temp.rrd:R24h:MIN \
LINE2:R24h_line#0052C1:"Accumulative" \
-c CANVAS#E5E5E5 COMMENT:\\n  \
VDEF:MaxRn=rain_max,MAXIMUM \
VDEF:MinRn=rain_min,MINIMUM \
CDEF:R24Hr=rain_max,rain_min,- \
COMMENT:"Last Hr = $R1h mm\r" \
COMMENT:"Last 24Hr = $R24h mm\r" \
COMMENT:"Last 24Hr = $R24Hr mm\r" \
    GPRINT:MaxRn:"MaxRn = %3.2lf mm " \
    GPRINT:MinRn:"MinRn = %3.2lf mm " \
    GPRINT:R24Hr:"R24Hr = %3.2lf mm " \
COMMENT:\\n  \
COMMENT:"$graph_date\r"  \
COMMENT:"\r"

     The output of this gives this online image -> 
http://www.rods.id.au/rrdtool/rain-D.png

     Executing the above results in the following error message

ERROR: Cannot parse CF in 'GPRINT:R24Hr:R24Hr = %3.2lf mm '

     If, I remove the offending line, the image above will be generated....

     I'm following the syntax for RPN in the line 
CDEF:R24Hr=rain_max,rain_min,- but I still don't get a output form the 
"COMMENT" lines or GPRINT lines...

     This is a bash script, but it should still work..

     I'm running Gentoo - RRDtool 1.4.7  Copyright 1997-2012 by Tobias 
Oetiker <tobi at oetiker.ch>
                Compiled Nov 25 2012 07:06:19



More information about the rrd-users mailing list