2011-01-08

top command on OS X

On Linux systems the top command shows the running processes sorted by the highest CPU consumption by default.
This is not the case on Mac OS X systems. There the processes are sorted by their PID in descending order (highest PID on top).
For those that are interested in the processes that consume much CPU use the following:
top -o cpu

This is for sorting the processes according their CPU usage.

For easier access you can create an alias.
Add the following line in you .profile file:
alias top='top -o cpu'