Activity monitor allows users to see the cpu usage on a per-core basis (for multicore machines, e.g. my MacBook Pro). Is there a way to find the percent usage of each core/processor via the command line?


I've installed htop for this purpose. In order to install on OS X (10.8.4), I used homebrew, which installed the htop package (brew install htop).

Despite the fact that this is via the command line, it is still a graphical output within the terminal.

  • Thanks! This program is awesome, it also seems to use about 5 times less CPU than top. For the record MacPorts also has a version of htop which works for OS X 10.8 port install htop – DilithiumMatrix Jun 26 '13 at 1:00
  • 1
    I would like to get the cpu utilization on a per core basis regularly throughout the day (e.g. every 1 minute). Is there any (built in or otherwise) way to schedule htop to run and store the results? – stevec Jul 17 '20 at 5:57
  • 1
    @stevec I don't think htop would be a good tool for this purpose, as it is designed for interactive usage, not for saving data. But I do think this is an interesting question that likely should be asked as a new question. – Scot Jul 18 '20 at 3:11
  • @Scot Thanks! I asked as a new question [here](apple.stackexchange.com/questions/396368/… – stevec Jul 18 '20 at 5:15

To install htop on OS X El Capitan follow these easy steps: Copy and paste the following commands into a terminal window:

curl -O http://themainframe.ca/wp-content/uploads/2011/06/htop.zip
unzip htop.zip
sudo mv htop /usr/local/bin
rm htop.zip

Run htop by entering htop into Terminal

  • There's no good reason to do that. That fork is 7 years old and fairly glitchy. htop 2 is out with proper OS X support, so just get it through brew. And make sure to install the "htop" package and not "htop-osx" (that's the same outdated fork). – tolgraven May 2 '16 at 1:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .