example-graphs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #!/bin/sh
  2. # An example graphing script for arexxd
  3. D=/var/log/arexxd
  4. rrdtool graph graph-12h-temp.png \
  5. --start 'now-12h' \
  6. --end 'now' \
  7. --title "Temperature" \
  8. -w 720 -h 600 \
  9. -x MINUTE:10:HOUR:1:HOUR:2:0:%H:%M \
  10. -y 5:1 \
  11. --right-axis 1:0 --right-axis-format "%3.0lf" \
  12. --units-exponent 0 --lower-limit -20 --upper-limit 40 --rigid \
  13. --legend-position east \
  14. DEF:a=$D/sensor-10415.rrd:temp:AVERAGE 'LINE1:a#0000cc:Ursarium\n' \
  15. DEF:b=$D/sensor-12133.rrd:temp:AVERAGE 'LINE1:b#00cc00:Balcony\n' \
  16. DEF:c=$D/sensor-19246.rrd:temp:AVERAGE 'LINE1:c#cc0000:Catarium'
  17. rrdtool graph graph-12h-humidity.png \
  18. --start 'now-12h' \
  19. --end 'now' \
  20. --title "Relative Humidity" \
  21. -w 720 -h 600 \
  22. -x MINUTE:10:HOUR:1:HOUR:2:0:%H:%M \
  23. -y 5:2 \
  24. --right-axis 1:0 --right-axis-format "%3.0lf" \
  25. --legend-position east \
  26. --units-exponent 0 --lower-limit 0 --upper-limit 100 --rigid \
  27. DEF:a=$D/sensor-19247.rrd:rh:AVERAGE 'LINE1:a#cc0000:Catarium'
  28. rrdtool graph graph-monthly-temp.png \
  29. --start 'now-30d' \
  30. --end 'now' \
  31. --title "Temperature: MIN and MAX" \
  32. -w 720 -h 600 \
  33. -x DAY:1:DAY:5:DAY:5:0:%d:%m \
  34. -y 5:1 \
  35. --right-axis 1:0 --right-axis-format "%3.0lf" \
  36. --units-exponent 0 --lower-limit -20 --upper-limit 40 --rigid \
  37. --legend-position east \
  38. DEF:alo=$D/sensor-10415.rrd:temp:MIN 'LINE1:alo#0000cc:Ursarium\n' \
  39. DEF:ahi=$D/sensor-10415.rrd:temp:MAX 'LINE1:ahi#0000cc' \
  40. DEF:blo=$D/sensor-12133.rrd:temp:MIN 'LINE1:blo#00cc00:Balcony\n' \
  41. DEF:bhi=$D/sensor-12133.rrd:temp:MAX 'LINE1:bhi#00cc00' \
  42. DEF:clo=$D/sensor-19246.rrd:temp:MIN 'LINE1:clo#cc0000:Catarium' \
  43. DEF:chi=$D/sensor-19246.rrd:temp:MAX 'LINE1:chi#cc0000'
  44. gq