From: Sven D. <sv...@ba...> - 2005-08-29 20:40:23
|
Hi there, I monitor my central heating with cacti including a solar panel on the roof. I want to show the user the current diff of kWh in each graph which is created. So my calculation-thinking is: DIFF = LAST-Value - MIN-Value I put this into the following CDEF-definition inside cacti: cdef=CURRENT_DATA_SOURCE,CURRENT_DS_MINIMUM_VALUE,- and put it into the legend with GPRINT. But the graph is broken, this is the debug code: /usr/local/rrdtool-1.2.11/bin/rrdtool graph - \ --imgformat=PNG \ --start=-86400 \ --end=-300 \ --title="CAPITO Solarbilanz" \ --base=1000 \ --height=120 \ --width=500 \ --alt-autoscale \ --units-exponent=1 \ --vertical-label="" \ --slope-mode \ DEF:a="/home/httpd/html/cacti-0.8.6f/rra/capito.rrd":solarbilanz:AVERAGE \ CDEF:cdefd=a,0,- \ AREA:a#EA8F00:"Solarbilanz in kWh" \ GPRINT:a:LAST:"Aktuell\:%8.0lf" \ GPRINT:a:MIN:"Min\:%8.0lf" \ GPRINT:cdefd:LAST:"Diff\:%8.0lf" I wonder why there is: CDEF:cdefd=a,0,- \ the "0" should be something like the minimal value, right? Did anybody manage to get something like this working? Sven |