Skip to content

Instantly share code, notes, and snippets.

@pelenthium
Created July 25, 2017 15:12
Show Gist options
  • Save pelenthium/1f704e807b11358e29e8b2775db91b71 to your computer and use it in GitHub Desktop.
Save pelenthium/1f704e807b11358e29e8b2775db91b71 to your computer and use it in GitHub Desktop.
Memory used by proccess
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 "" }' |cut -d "" -f2 | cut -d "-" -f1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment