]> mj.ucw.cz Git - arexx.git/blob - web/temp-48h.cgi
e704c60ff95ac88e285096c8aa56898aa0153c55
[arexx.git] / web / temp-48h.cgi
1 #!/bin/sh
2 echo "Content-type: image/png"
3 echo
4 D=/var/log/arexxd
5 exec rrdtool graph - \
6         --start 'now-48h' \
7         --end 'now' \
8         --title "Temperature: Last 2 days" \
9         -w 720 -h 600 \
10         -x HOUR:1:HOUR:8:HOUR:8:0:%H:%M \
11         -y 5:1 \
12         --right-axis 1:0 --right-axis-format "%3.0lf" \
13         --units-exponent 0 --lower-limit -20 --upper-limit 40 --rigid \
14         --legend-position east \
15         DEF:c=$D/sensor-catarium.rrd:temp:AVERAGE \
16         DEF:u=$D/sensor-ursarium.rrd:temp:AVERAGE \
17         DEF:b=$D/sensor-balcony.rrd:temp:AVERAGE \
18         DEF:o=$D/sensor-outside.rrd:temp:AVERAGE \
19         'AREA:c#cc7777' \
20         'AREA:u#7777cc' \
21         'AREA:b#cc77cc' \
22         'AREA:o#77cc77' \
23         'LINE2:c#cc0000:Catarium\n' \
24         'LINE2:u#0000cc:Ursarium\n' \
25         'LINE2:b#cc00cc:Balcony\n' \
26         'LINE2:o#00cc00:Outside' \
27         'HRULE:0#0000ff'