Last active
August 13, 2016 07:09
-
-
Save david-pm/5d6fb6069f9590202fa8b31aa92293bf to your computer and use it in GitHub Desktop.
monitor memory usage over time
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# example usage | |
# | |
# > mem 0.1 100 | |
for i in `seq 1 $2` | |
do | |
free -m | |
cat /proc/meminfo | grep MemFree | |
echo "--------------------" | |
echo | |
sleep $1 | |
done | |
uptime | tr -s ' ' | cut -d ' ' -f 7-11 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment