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