Is there a valid alternative to top for OpenBSD?

Htop 2.0 adds OpenBSD support. I just compiled it on OpenBSD 5.9 and it works very well: http://hisham.hm/htop/


systat(1), top(1) and ps are your best choices.

At some point you were able to mount procfs on OpenBSD - see mount_procfs(8) but this was recently removed from the standard configuration. You can try to build a custom kernel, but I expect procfs support was removed for a good reason.

For example, see this commented out line in /usr/src/sys/arch/i386/conf/GENERIC

#option          PROCFS          # /proc, currently broken

You can try to build a new kernel with procfs support. It's only supported on i386 and is broken in 5.6 (as far as I can tell).

cd /tmp; wget http://ftp.spline.de/pub/OpenBSD/5.6/sys.tar.gz
tar xzf /tmp/sys.tar.gz # Unpack sources
cd /usr/src/sys/arch/i386/conf
vi GENERIC # Comment out the procfs line
config GENERIC
cd ../compile/GENERIC
make clean && make
make install
reboot

Now you can mount procfs:

mount_procfs /proc /proc

Build htop (it requires procfs and is only supported on Linux. Technically it works on FreeBSD as well, with the procfs mounted, and may end up working on OpenBSD... your mileage may vary. I wouldn't trust it though...

wget http://hisham.hm/htop/releases/1.0/htop-1.0.tar.gz
tar zxf htop-1.0.tar.gz
cd htop-1.0
./configure
make
make install

Or really, just use top instead...


From OpenBSD 5.9 htop is available as a package and it works very well.

To install it, use

pkg_add htop

as root.

Tags:

Openbsd

Top