temp-month.cgi 910 B

1234567891011121314151617181920212223
  1. #!/bin/sh
  2. echo "Content-type: image/png"
  3. echo
  4. D=/var/log/arexxd
  5. exec rrdtool graph - \
  6. --start 'now-30d' \
  7. --end 'now' \
  8. --title "Temperature: MIN and MAX" \
  9. -w 720 -h 600 \
  10. -x DAY:1:DAY:5:DAY:5:0:%d:%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:alo=$D/sensor-ursarium.rrd:temp:MIN 'LINE2:alo#0000cc:Ursarium\n' \
  16. DEF:ahi=$D/sensor-ursarium.rrd:temp:MAX 'LINE2:ahi#0000cc' \
  17. DEF:dlo=$D/sensor-catarium.rrd:temp:MIN 'LINE2:dlo#cc0000:Catarium\n' \
  18. DEF:dhi=$D/sensor-catarium.rrd:temp:MAX 'LINE2:dhi#cc0000' \
  19. DEF:clo=$D/sensor-balcony.rrd:temp:MIN 'LINE2:clo#cc00cc:Balcony\n' \
  20. DEF:chi=$D/sensor-balcony.rrd:temp:MAX 'LINE2:chi#cc00cc' \
  21. DEF:blo=$D/sensor-outside.rrd:temp:MIN 'LINE2:blo#00cc00:Outside' \
  22. DEF:bhi=$D/sensor-outside.rrd:temp:MAX 'LINE2:bhi#00cc00' \
  23. 'HRULE:0#0000ff'