Watch & Manage System Resources with htop for Mac OS X
If you like to keep an eye on system resources and you want to branch out from the GUI Activity Monitor, check out htop for Mac OS X. htop is basically a significantly improved version of top, which lets you monitor system resources, CPU core load, memory use, load averages, and manage running processes.
If you come from the linux world, you’re probably already familiar with htop, but if you’re not here’s why it’s better than top: for starters, it just looks better and is easier to read thanks to an improved layout and use of ANSII colors, but beyond that it’s great because it functions much like a task manager, allowing you select and then renice or kill processes as needed. I find this easier than manually entering PID’s through top.
The easiest way to get htop running on Mac OS X is by installing it through MacPorts:
- Get MacPorts and install it if you don’t have it already
- After MacPorts is installed, launch a new Terminal window and type:
sudo port install htop
Installing htop may take a while because it requires quite a few dependencies (zlib, openssl, perl, etc), but MacPorts will handle installing and downloading them all for you. If you have none of this already on your Mac, it could take up to 15 minutes for all of the necessary files to download, compile, and install.
After MacPorts is complete, launch a new Terminal session and type ‘htop’ to access the app. You navigate and use htop through the arrow and function keys, which you’ll see are laid out at the bottom.
I find htop to look best at fullscreen against a white background, but if you have a slightly transparent black terminal it looks great too:
If you like this, be sure to check out more command line tips.