Skip to content

Instantly share code, notes, and snippets.

@otiai10
Created July 9, 2013 06:00
Show Gist options
  • Save otiai10/5955036 to your computer and use it in GitHub Desktop.
Save otiai10/5955036 to your computer and use it in GitHub Desktop.
memory usage check (sec by sec)
flg=0
cur_date=`date '+%Y.%m%d.%H:%M:%S'`
echo $cur_date
while true
do
if [ $flg -eq 0 ]; then
free | head -2
else
free | head -2 | tail -1
fi
flg=1
sleep 1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment