Sort CPU usage

I don’t know if this works in any unix, but for me works in AIX and Linux.
Sorting CPU usage:

# ps -eo pid,user,%cpu,args --sort %cpu

Source: Kairo Araujo

1 Comment so far

  1. Zeth on October 13, 2007

    The following is more cross-platform and almost as good:

    ps -eo pcpu,pid,user,args

    The sort option and the use of % are not universal, but you can pipe the output to something else if you really have a lot of processes.

Leave a reply