temp-48h.cgi 755 B

123456789101112131415161718192021222324252627
  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'