Skip to content

Instantly share code, notes, and snippets.

@lifeblood
Forked from chikien276/mem_used.sh
Created January 1, 2023 10:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lifeblood/bd34fba916549491254c0a47d0831a75 to your computer and use it in GitHub Desktop.
Save lifeblood/bd34fba916549491254c0a47d0831a75 to your computer and use it in GitHub Desktop.
Human readable memory usage in Linux per process
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 "" }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment