Counting the number of times a threshold has been reached and print that number, trouble with TOTAL

Alexander Topolanek <[email protected]> Tue, 26 Jul 2016 09:07:56 +0200
Newsgroups gmane.comp.db.rrdtool.user
Message-ID <[email protected]>
Hello,


I'm collecting data from my weather station and keep the data in a rrd. 
I've consolidated values over the year for minimum, maximum and average 
temperature for each day of the year. I would like to present the number 
of days that meet some criteria, i.e. "Number of hot day (Max Temp > 
30°C)" .

I've tried with

rrdtool graph temps-2016-2103test.png -s 20160701 -e start+1m  \
   -w 1200 -h 300 \
   --upper-limit 40 --lower-limit -15 \
   --title "Temperatur  2016  Test" \
   DEF:tempmins9=/var/rrd/weather.rrd:temps9:MIN:step=1 \
   DEF:tempmaxs9=/var/rrd/weather.rrd:temps9:MAX:step=1 \
   DEF:temps9=/var/rrd/weather.rrd:temps9:AVERAGE \
   CDEF:hotday=tempmaxs9,30,GE \
   VDEF:sumhotdays=hotday,TOTAL \
   CDEF:tempranges9=tempmaxs9,tempmins9,- \
   LINE1:tempmins9#00C000 \
   AREA:tempranges9#00F000::STACK \
   LINE1:tempmaxs9#00C000 \
   LINE2:temps9#00C000:Aussen \
   LINE2:hotday#C00000:Hotday \
   GPRINT:sumhotdays:"total %3.10lf %s"


But the result is weird... the line for hotdays is working, showing 1's 
for all days above 30, but the total is 1.296000 M, not 14...

kind regards
Alexander

-- 

liebe Grüße
Alexander Topolanek
http://www.bienenhonig.cc

_______________________________________________
rrd-users mailing list
[email protected]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
smime.p7s (application/pkcs7-signature, 4.1 KB) - not displayed