Created
September 24, 2020 09:55
-
-
Save FlowerWrong/b1671bbcb372cb22cb58a0250b27e640 to your computer and use it in GitHub Desktop.
Display Processes Sorted By Memory Usage in Linux
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
ps axo rss,comm,pid \ | |
| awk '{ proc_list[$2] += $1; } END \ | |
{ for (proc in proc_list) { printf("%d\t%s\n", proc_list[proc],proc); }}' \ | |
| sort -n | tail -n 10 | sort -rn \ | |
| awk '{$1/=1024;printf "%.0fMB\t",$1}{print $2}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment