Watch & Manage System Resources with htop for Mac OS X

May 6, 2011 - 12 Comments

htop for Mac

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:

htop for Mac OS X

If you like this, be sure to check out more command line tips.

Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of our great Apple tips, tricks, and important news delivered to your inbox! Enter your email address below:

Related articles:

Posted by: William Pearson in Command Line, Mac OS X, Tips & Tricks

12 Comments

» Comments RSS Feed

  1. nobrainer says:

    I get port htop not found…

    when I went to sourceforge i checked out the svn but can’t run it. macports did load however…

    • Will says:

      If you just installed MacPorts for the first time, you need to open a new shell for the command to work.

      • nobrainer says:

        I tried that, still no go.
        Could it be because I’m using Xcode 4.x on 10.6 server? (trying to track down a memory leak)

  2. roy_hu says:

    I like homebrew better than MacPorts.

  3. Ian says:

    Does Homebrew have htop though? I thought it didn’t work?

  4. Dave says:

    Nice to hear about htop! Not so nice to hear the suggestion that one should install it via Mac Ports. Frankly Mac Ports sucks, you will end up with tons of dependencies installed that do nothing for you.

    Not to complain but a tool like this really needs to be 100% Mac native and only dependent upon installed software. That is the base Mac OS/X system. So while htop is a cool idea, having to install tons of crap isn’t.

  5. I have always a htop open in my Visor Terminal (A Quake-style drop-down Terminal)

    http://visor.binaryage.com/

  6. […] you could just install htop for Mac OS X through MacPorts or Homebrew. htop is superior to top in many ways, but because it requires […]

  7. charleshb says:

    I had to install Xcode for MacPorts to work.

  8. acet3chnician says:

    Also works well if you run htop as an alias for top. That way top always brings up htop, at least in oh-my-zsh.

Leave a Reply

 

Shop for Apple & Mac Deals on Amazon.com

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates