Skip to content

Instantly share code, notes, and snippets.

@johnty
Created May 4, 2016 15:41
Show Gist options
  • Save johnty/25b67bed6b9aafa5a87efc59678b46e5 to your computer and use it in GitHub Desktop.
Save johnty/25b67bed6b9aafa5a87efc59678b46e5 to your computer and use it in GitHub Desktop.
print out memory stats
while true; do
echo -n memfree: "`free -m | head -2 | tail -1 | awk '{print $4}'` ";
echo -ne swap used: "`cat /proc/swaps | tail -1 | awk '{print $4}'` \r";
sleep 1;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment