Wednesday, August 31, 2016

Useful Linux Commands - Memory consumed by Processes - in ascending order

Use the below command to display nice view of all processes sort by consumed memory in descending order

Linux / Unix Shell Command :

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 "" }'

0 comments:

Post a Comment