codekasten/digitemp/create_digitemp_png.sh

31 lines
1.3 KiB
Bash
Raw Normal View History

2007-05-16 13:40:15 +02:00
#!/bin/sh
## aus den per rrdtool datenbank werden hiermit bilder generiert
nice -n 19 rrdtool graph /var/log/temperatur/temperatur1.png -a PNG -b 1024 --start -129600 -A \
-l -10 -u 70 -t "Sensor1" --vertical-label "Grad Celsius" -w 600 -h 200 \
DEF:g1=/var/log/temperatur/temperaturen.rrd:Sensor1:AVERAGE \
DEF:gmin=/var/log/temperatur/temperaturen.rrd:Sensor1:MIN \
DEF:gmax=/var/log/temperatur/temperaturen.rrd:Sensor1:MAX \
VDEF:g1a=g1,LAST \
VDEF:gmina=gmin,MINIMUM \
VDEF:gmaxa=gmax,MAXIMUM \
LINE2:g1#ff0000:"Sensor1" \
GPRINT:g1a:"aktuell\: %5.2lf <20>C" \
#GPRINT:gdurch:"Durchschnitt\: %5.2lf <20>C\n" \
#GPRINT:gmina:"tiefste\: %5.2lf <20>C" \
#GPRINT:gmaxa:"h<>chste\: %5.2lf <20>C" > /dev/null
nice -n 19 rrdtool graph /var/log/temperatur/temperatur2.png -a PNG -b 1024 --start -129600 -A \
-l -10 -u 60 -t "Sensor2" --vertical-label "Grad Celsius" -w 600 -h 200 \
DEF:g1=/var/log/temperatur/temperaturen.rrd:Sensor2:AVERAGE \
DEF:gmin=/var/log/temperatur/temperaturen.rrd:Sensor2:MIN \
DEF:gmax=/var/log/temperatur/temperaturen.rrd:Sensor2:MAX \
VDEF:g1a=g1,LAST \
VDEF:gmina=gmin,MINIMUM \
VDEF:gmaxa=gmax,MAXIMUM \
LINE2:g1#ff0000:"Sensor2" \
GPRINT:g1a:"aktuell\: %5.2lf <20>C" \
#GPRINT:gdurch:"Durchschnitt\: %5.2lf <20>C\n" \
#GPRINT:gmina:"tiefste\: %5.2lf <20>C" \
#GPRINT:gmaxa:"h<>chste\: %5.2lf <20>C" > /dev/null