Skip to content

Instantly share code, notes, and snippets.

@thomasmooon
Created November 26, 2018 08:46
Show Gist options
  • Save thomasmooon/750928c80cfecb442e60784938575efd to your computer and use it in GitHub Desktop.
Save thomasmooon/750928c80cfecb442e60784938575efd to your computer and use it in GitHub Desktop.
linux memory log
#!/bin/bash -e
echo " date time $(free -m | grep total | sed -E 's/^ (.*)/\1/g')"
while true; do
echo "$(date '+%Y-%m-%d %H:%M:%S') $(free -m | grep Mem: | sed 's/Mem://g')"
sleep 1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment