summaryrefslogtreecommitdiff
path: root/i3/Scripts/ram.sh
diff options
context:
space:
mode:
Diffstat (limited to 'i3/Scripts/ram.sh')
-rw-r--r--i3/Scripts/ram.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/i3/Scripts/ram.sh b/i3/Scripts/ram.sh
new file mode 100644
index 0000000..b0c2442
--- /dev/null
+++ b/i3/Scripts/ram.sh
@@ -0,0 +1,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
+