[rrd-users] CDEF Help

Rod Rod at Rods.id.au
Sat Jun 1 13:46:50 CEST 2013


On 06/01/13 14:27, Steve Shipway wrote:
> This is because, MaxRn and MinRn are VDEFs, and so have a single value and can be printed.  R24Hr, on the other hand, is a CDEF, and (like a DEF) is a time series.  Therefore, you also need to specify a CF (MIN, MAX, AVERAGE) so that it can reduce it to a single value.  The better way, though, is to make a VDEF and use that instead.
>
> Steve
>
> Steve Shipway
> University of Auckland ITS
> UNIX Systems Design Lead
> s.shipway at auckland.ac.nz
> Ph: +64 9 373 7599 ext 86487
>
>
> ___
> _______________________________________________
> rrd-users mailing list
> rrd-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
>
>

     Hi Steve/List

     So, your saying, I should do something like this ?

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:a=rain_max,rain_min,- \

     VDEF:R24Hr=a,MINIMUM \

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"

     As in, adding a VDEF in for the Rain 24Hr calculation ?

     MINIMUM & MAXIMUM gave 0.00 as the result?



More information about the rrd-users mailing list