[rrd-users] Displaying "difference" or "Change" over the displayed period

yendor Rod at Rods.id.au
Wed Mar 7 21:31:14 CET 2012


Hi,

     I have been using RRD for quite a while now, and I would like to 
replicate something that my old weather station gave.

     That is, how much rain has fallen over the previous 24Hrs (though 
the weather station previous 24Hr reset at midnight) I'm sure RRD would 
be able to do the full 24Hr, or full time scale -24H or -48H...

     On this link is a rainfall that I'm trying to do.

http://www.rods.id.au/rrdtool/rain-D.png

     As you can see,
         I have the MIN value displayed = 144.95
         I have the MAX value displayed  = 148.98


         But I cannot work out how to get it to display (MAX-MIN) to = 4.03

code:

DEF:rain-max=rain.rrd:R24h:MAX \
DEF:rain-min=rain.rrd:R24h:MIN \
   VDEF:MaxRn=rain-max,MAXIMUM \
   VDEF:MinRn=rain-min,MINIMUM \
   CDEF:R24Hr=rain-max,rain-min,- \ <- This doesn't work
COMMENT:"Last Hr = $R1h mm\r" \
COMMENT:"Last 24Hr = $R24h mm\r" \
COMMENT:"Last 24Hr = $MaxRn-$MinRn mm\r" \
   GPRINT:MaxRn:"Max Rainfall = %3.2lf mm " \
   GPRINT:R24Hr:"Last 24Hr = %3.2lf mm " \



More information about the rrd-users mailing list