One of the few things I missed when I made my move from Linux to OSX is the ability to use htop. As many of you might know, OSX is based on Mach Kernel – a custom implementation of Unix. So right out of the box OSX gives you the power of many *nix command line tools, which is why users who are comfortable with *nix systems, fit right at home with OSX.
Unfortunately htop doesn’t have OSX binary available so you will basically have to install it from source. Fortunately, there is an OSX specific htop project out there.
First you will need to install git (skip if you already have git installed):
curl http://kernel.org/pub/software/scm/git/git-1.6.3.3.tar.gz -O
tar xzvf git-1.6.3.3.tar.gz
cd git-1.6.3.3
make configure
./configure --prefix=/usr/local
NO_MSGFMT=yes make prefix=/usr/local all
sudo make install
Now you can use git to install htop-osx:
git clone git://github.com/AndyA/htop-osx.git
cd htop-osx
git checkout -b osx origin/osx
./autogen.sh
./configure
make
sudo make install
Filed under: Apple & OSX, Linux & Open Source
Follow us on twitter
Comments:
-
Felipe Coury
10/23/2009It’s not supposed to work in Snow Leopard, right? I get this after compiling/installing:
htop(8161) malloc: *** error for object 0×100cf0: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
zsh: abort htopJust to make sure ;)
Best regards,
– Felipe.
-
Mark Nichols
11/10/2009I get the same error as Felipe, also on Snow Leopard (10.6.1).
$ htop
htop(74211) malloc: *** error for object 0×100cf0: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trapHopefully this can be addressed as I would love to have htop.
Mark -
Nicolas
12/07/2009Thanks for the info. Did you guys solved the Snow Leopard problem?
Here is what I get :
macbook:htop-osx xxx$ htop
htop(8907) malloc: *** error for object 0×100cf0: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap -
olorin
12/30/2009Do this before ./configure:
export CFLAGS=”-m32″This will force building htop as x86 (32-bit, 64-bit by default) application – this way it works :)
-
Kevin
01/22/2010@olorin
Thanks, that worked for me running 10.6.2
Any drawback to running it in 32-bit?


07/15/2009
Thanks for this. Htop is the first thing I install whenever I setup a new server. This is much better than top IMO