]> mj.ucw.cz Git - arexx.git/commitdiff
Added an example graphing script
authorMartin Mares <mj@ucw.cz>
Tue, 27 Dec 2011 18:42:11 +0000 (19:42 +0100)
committerMartin Mares <mj@ucw.cz>
Tue, 27 Dec 2011 18:42:11 +0000 (19:42 +0100)
rg [new file with mode: 0755]

diff --git a/rg b/rg
new file mode 100755 (executable)
index 0000000..0cd6181
--- /dev/null
+++ b/rg
@@ -0,0 +1,28 @@
+#!/bin/sh
+# An example graphing script for arexxd
+
+D=/var/log/arexxd
+
+rrdtool graph graph-12h-temp.png \
+       --start 'now-12h' \
+       --end 'now' \
+       --title "Temperature" \
+       -w 720 -h 600 \
+       -x MINUTE:10:HOUR:1:HOUR:2:0:%H:%M \
+       -y 5:2 \
+       --units-exponent 0 --lower-limit -20 --upper-limit 40 --rigid \
+       --legend-position east \
+       DEF:a=$D/sensor-10415.rrd:temp:AVERAGE 'LINE1:a#0000cc:Ursarium\n' \
+       DEF:b=$D/sensor-12133.rrd:temp:AVERAGE 'LINE1:b#00cc00:Balcony\n' \
+       DEF:c=$D/sensor-19246.rrd:temp:AVERAGE 'LINE1:c#cc0000:Catarium'
+
+rrdtool graph graph-12h-humidity.png \
+       --start 'now-12h' \
+       --end 'now' \
+       --title "Relative Humidity" \
+       -w 720 -h 600 \
+       -x MINUTE:10:HOUR:1:HOUR:2:0:%H:%M \
+       -y 5:2 \
+       --legend-position east \
+       --units-exponent 0 --lower-limit 0 --upper-limit 100 --rigid \
+       DEF:a=$D/sensor-19247.rrd:rh:AVERAGE 'LINE1:a#cc0000:Catarium'