Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

The top command on OS X is pretty crappy.. The one included with most Linux distros allows you to change the sort-by column using < and >, there is a coloured mode (by pressing the z key), and a bunch of other useful options.

Is there a replacement command line tool? Ideally I would like htop for OS X, but because it relies on the /proc/ filesystem (see this thread) it has not been ported (and probably will never be)

The obvious answer is "Activity Monitor", but I'm looking for a command line tool!


locked by HopelessN00b Dec 5 at 5:58

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. This question and its answers are frozen and cannot be changed. More info: help center.

closed as not constructive by voretaq7 Dec 9 '12 at 2:15

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

<3 htop. +1 added for this reason. Message extended because of the stupid character requirement. –  Kent Fredric May 2 '09 at 13:52
ok, I've answered the 'sort' problem - what other "useful options" are you missing? –  Alnitak May 2 '09 at 16:37
Note that a /proc filesystem can be made available using MacFUSE: osxbook.com/book/bonus/chapter11/procfs I don't know of any 'top' port that leverages this, however. –  Sören Kuklau May 3 '09 at 18:54
I'm afraid that the MacFUSE procfs is not a drop-in replacement for Linux's procfs. When I tried compiling htop (or running dstat), I was stopped because there is no /proc/stat directory. –  Clinton Blackmore Jun 2 '09 at 20:15

6 Answers 6

up vote 23 down vote accepted

top on MacOS X does support sorting, at least:

    O<skey>        Set secondary sort key to <skey> (see o<key>).
    o<key>         Set primary sort key to <key>: [+-]{command|cpu|pid

Top on OS X requires a little tweaking (it's not as 'blinged out' as GNU top), but it's easy to do.

On Leopard or Tiger, I use 'top -FRo [field]', where '[field]' is typically cpu, vsize, rsize, and so on. The -F and -R options will sacrifice some precision for memory calculation for a huge decrease in CPU usage by top.


I'm working on porting htop to OSX. The repo is here (more active fork here, and can be installed via brew install htop)

I'm currently trying to work out what to do about the licensing clash between Apple's libtop (APSL) and htop (GPL). There's probably not much more programming to do on it - but I may have to re-implement the bits of libtop I need. If anyone has suggestions on how to make the licensing work please speak up.

enter image description here

Screenshot: flickr.com/photos/andyarmstrong/3651319080 –  hexten Jul 2 '09 at 10:26
Good work, my only concern is that you need to run it with sudo to see memory information. If posible make it work without asking for sudo, try to escalate directly from it. –  sorin Dec 8 '12 at 15:50
Unfortunately mouse clicks do not work. –  Erik Kaju Nov 5 at 12:40

htop is now part of macports -- enjoy


There is also a brew for htop if that's how you roll.

Unfortunately, Apple's /usr/bin/top continues to regress, as it no longer even understands compound single char args:

$ top -FR
invalid option or syntax: -FR

Now you must use e.g. "top -F -R -u". But, hey, Apple's "top" does not sort by cpu by default so perhaps that's the least of its worries.


Glances - Eye on your system is what you are looking for. I previously used it on Linux, it is cross-platform and is really good.

Here is my screenshot.

enter image description here


Not the answer you're looking for? Browse other questions tagged or ask your own question.