blob: b0c244284279ac08bd11e2d15e7355c3a97414a0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
PIDFILE=/tmp/statRam.pid
STATUSFILE=/tmp/dsbRfree
kill `cat $PIDFILE`
if [ $? -eq 0 ]; then
echo "Shutting down"
rm $STATUSFILE
exit
fi
echo "Starting up"
echo $$ > $PIDFILE
while true; do
echo " $(free -h | grep Mem: | awk '{print $3}') " > $STATUSFILE
sleep 2
done
|