Created
October 17, 2013 08:41
-
-
Save dearaujoj/7021327 to your computer and use it in GitHub Desktop.
Total amount of memory used by the various process running on Linux
This file contains hidden or 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
ps -eo size,pid,user,command --sort -size | awk '{ hr=$1/1024 ; printf("%13.2f Mb ",hr) } { for ( x=4 ; x<=NF ; x++ ) { printf("%s ",$x) } print "" }' | awk '{total=total + $1} END {print total}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment