summaryrefslogtreecommitdiff
path: root/dwm/Scripts/ram.sh
diff options
context:
space:
mode:
authorJulian T <julian@jtle.dk>2019-04-28 14:30:07 +0200
committerJulian T <julian@jtle.dk>2019-04-28 14:30:07 +0200
commit96bc496f36e479fd7db0dab017a2339a6051171f (patch)
tree3caf83a71179d98380b71844c30eb3fc3703314a /dwm/Scripts/ram.sh
parente5b32832dcf52e7e991be0f23fc5ddb1adc78672 (diff)
Added status scripts
Diffstat (limited to 'dwm/Scripts/ram.sh')
-rw-r--r--dwm/Scripts/ram.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/dwm/Scripts/ram.sh b/dwm/Scripts/ram.sh
new file mode 100644
index 0000000..b0c2442
--- /dev/null
+++ b/dwm/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
+