Sort unix processes by memory usage

28.12.12
Below is a most simple command for Sorting Unix processes by highest memory usage:

ps -eo pmem,pid,pcpu,rss,vsz,time,args | sort -k 1 -r

3 comments:

  1. I’m glad I come across this column I found little good stuff and enjoyed reading them. It’s very informative and useful.

    www.n8fan.net

    ReplyDelete
  2. I read your blog.I thought it was great.. Hope you have a great day. God bless.

    Camille
    www.imarksweb.org

    ReplyDelete
  3. Add -n for numeric sorting.

    ps -eo pmem,pid,pcpu,rss,vsz,time,args | sort -k 1 -n -rps -eo pmem,pid,pcpu,rss,vsz,time,args | sort -k 1 -r -n

    ReplyDelete