projects
/
svn42.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
37d6aba
)
grml
author
Bernhard Tittelbach
<xro@realraum.at>
Tue, 23 Mar 2010 12:35:20 +0000
(12:35 +0000)
committer
Bernhard Tittelbach
<xro@realraum.at>
Tue, 23 Mar 2010 12:35:20 +0000
(12:35 +0000)
sensor_graph/sample_sensors.sh
patch
|
blob
|
history
diff --git
a/sensor_graph/sample_sensors.sh
b/sensor_graph/sample_sensors.sh
index
ed902d5
..
6474ed5
100755
(executable)
--- a/
sensor_graph/sample_sensors.sh
+++ b/
sensor_graph/sample_sensors.sh
@@
-4,9
+4,9
@@
echo -e "listen sensor\n" | usocket /var/run/powersensordaemon/cmd.sock -n | ./s
PID1=$!
echo -e "listen movement\n" | usocket /var/run/powersensordaemon/cmd.sock -n >> /tmp/movement.tmp &
PID2=$!
-trap "kill $PID1 $PID2" 0
+trap "kill $PID1 $PID2" 0 INT QUIT
while sleep 30; do
- L=$(wc -l /tmp/movement.tmp | cut -d' ' -f1)
+ L=$(wc -l /tmp/movement.tmp | sed 's/[^0-9]*//g')
echo -n > /tmp/movement.tmp
rrdtool update /home/sensormovement.rrd -t movement N:$L
done