Skip to content

Instantly share code, notes, and snippets.

@maluta
Created February 4, 2010 16:27
Show Gist options
  • Save maluta/294835 to your computer and use it in GitHub Desktop.
Save maluta/294835 to your computer and use it in GitHub Desktop.
#!/bin/sh
count='0'
while [ 1 ]
do
#mem_total=`free | grep "^Mem" | awk '{ print $2 }'`
mem_used=`free | grep "^Mem" | awk '{ print $3 }'`
mem_free=`free | grep "^Mem" | awk '{ print $4 }'`
echo -e $count '\t' $mem_total '\t' $mem_used '\t' $mem_free
count=`expr $count + 2`
sleep 2
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment