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
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
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.
Zeth - October 13, 2007 at 7:43
Thank you very much!
This was exactly what I was looking for!
Except I wanted mine to be reverse sorted and smaller so:
# ps -eo pid,user,%cpu,args –sort -%cpu | head
Daemon - November 9, 2009 at 22:43