htop on the Netgear RN312

Just a quick post on how easy it is to set up the invaluable htop package on the Netgear RN312.  For those not familiar with htop, it’s a super-powered process monitor, way way better than the old legacy top command. Nice stuff, must have.

Turns out the pre-built package for htop is borked though (apt-get install htop fails) . Bummer.  Time to pull out the command line magic..

ssh into the NAS, then set up a build environment and a couple of dependencies. Compile and install (set the debconf to dialog and medium level):

dpkg-reconfigure debconf

apt-get install build-essential

<wait for looooong time>

cd /root/dl

wget http://downloads.sourceforge.net/project/htop/htop/1.0.2/htop-1.0.2.tar.gz

tar -xvzf htop-1.0.2.tar.gz

./configure; make; make install

Fail:

checking for refresh in -lncursesw… no

configure: error: You may want to use –disable-unicode or install libncursesw.

Ok, so let’s fix that, we need dev libs:

apt-get install libncursesw5-dev

./configure; make; make install

Fail 2, we need another set of ncurses dev libs:

apt-get  install libncurses5-dev

./configure; make; make install

… and that does it. Enjoy htop on your x86 based Netgear ReadyNAS!