1
0
mirror of https://github.com/skaringa/water-counter.git synced 2024-11-22 01:14:24 +01:00

print daily values to graph

This commit is contained in:
Martin Kompf 2016-03-29 19:22:28 +02:00
parent 6a362159f7
commit d7d7e1b058

View File

@ -1,13 +1,18 @@
#!/bin/sh #!/bin/sh
rrdtool graph counter.gif \ rrdtool graph counter.gif \
-s 'now -20 hour' -e 'now' \ -s 'now -1 day' -e 'now' \
-X 0 -A \ -X 0 -A \
DEF:counter=water.rrd:counter:LAST \ DEF:counter=water.rrd:counter:LAST \
VDEF:lastcount=counter,LAST \
"GPRINT:lastcount:%6.3lf m³" \
LINE2:counter#000000:"Zählerstand [m³]" LINE2:counter#000000:"Zählerstand [m³]"
display counter.gif& display counter.gif&
rrdtool graph consum.gif \ rrdtool graph consum.gif \
-s 'now -20 hour' -e 'now' \ -s 'now -1 day' -e 'now' \
DEF:consum=water.rrd:consum:AVERAGE \ DEF:consum=water.rrd:consum:AVERAGE \
CDEF:consumltr=consum,60000,* \ CDEF:consumltr=consum,60000,* \
CDEF:conpd=consumltr,60,*,24,* \
VDEF:conpdtotal=conpd,AVERAGE \
"GPRINT:conpdtotal:Total %4.0lf l/d" \
LINE2:consumltr#00FF00:"Verbrauch [l/min]" LINE2:consumltr#00FF00:"Verbrauch [l/min]"
display consum.gif& display consum.gif&