Last active
January 18, 2016 12:30
-
-
Save geraldstanje/6d51cbb84702bff4bb06 to your computer and use it in GitHub Desktop.
get the max memory usage of an app
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
# start the app: | |
while true; do ./main; sleep 0.1; done; | |
# monitor: | |
max=0; | |
for i in {1..200}; | |
do | |
x=`ps aux | grep -m1 main | awk '{print $6}'`; | |
if [ $x -gt $max ]; then | |
max=$x; | |
fi; | |
sleep 0.1; | |
done; | |
echo $max |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment