Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
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).
brew install htop
Despite the fact that this is via the command line, it is still a graphical output within the terminal.
port install htop
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
sudo mv htop /usr/local/bin
Run htop by entering htop into Terminal