The classic top process monitor just doesn't cut it for me. I prefer htop, with processor & memory graphs, sorting options (including tree), and commands/keys called out in the UI (see attached).
You can install htop on Opnsense from the FreeBSD ports tree. Note that this takes up a lot of space; 3gb for me (1.2gb for ports, 1.7gb for src). On *Opnsense 21.1.2*, I had to do the following:
grab the ports tree, plus tools and source to compile from it:
Switch source to current version:
install dependencies:
I installed these as part of troubleshooting the htop install process (I tried resolving the build errors , so I'm not sure whether they would be automatically installed if you skip this step. If you try it out, let me know!)
Install htop:
2021-02-23 Update: changed make command to "make install clean" and updated source tree for v21.1: "# git checkout stable/21.1". Validated this works for me as of 2021-02-23 on OPNsense 21.1.2.
2022-03-07 Update: After upgrading to OpnSense 22.1, htop was still installed, but would not launch (this is expected due to library version changes). To get htop working again, I had to remove and reinstall it per the following:
update sources for tools and src repos:
attempt to update ports tree:
that didn't work for me, dying halfway through with a git error about "invalid distance" "too far back" for one of the objects.
Instead, I uninstalled all previous ports and removed the ports tree under /usr/ports. List installed ports by asking pkg to tell us which installed packages do not come from the OpnSense repository (those that do end with the repo string " OPNsense" so grep -v functions as a logical *not*:
Remove each non-OpnSense-precompiled package, e.g.:
Remove the ports tree entirely:
Fetch the ports tree anew:
Switch source to current version:
install dependencies if needed (if not needed, pkg will just let you know they're already the latest version):
Install htop:
After that, htop is working beautifully again! Thanks OpnSense team!
You can install htop on Opnsense from the FreeBSD ports tree. Note that this takes up a lot of space; 3gb for me (1.2gb for ports, 1.7gb for src). On *Opnsense 21.1.2*, I had to do the following:
grab the ports tree, plus tools and source to compile from it:
Code Select
# opnsense-code tools ports srcSwitch source to current version:
Code Select
# cd /usr/src
# git checkout stable/21.1
install dependencies:
Code Select
# pkg install autoconf automake libtool
I installed these as part of troubleshooting the htop install process (I tried resolving the build errors , so I'm not sure whether they would be automatically installed if you skip this step. If you try it out, let me know!)
Install htop:
Code Select
# cd /usr/ports/sysutils/htop
# make install clean
2021-02-23 Update: changed make command to "make install clean" and updated source tree for v21.1: "# git checkout stable/21.1". Validated this works for me as of 2021-02-23 on OPNsense 21.1.2.
2022-03-07 Update: After upgrading to OpnSense 22.1, htop was still installed, but would not launch (this is expected due to library version changes). To get htop working again, I had to remove and reinstall it per the following:
update sources for tools and src repos:
Code Select
# opnsense-code tools srcattempt to update ports tree:
Code Select
# opnsense-code portsthat didn't work for me, dying halfway through with a git error about "invalid distance" "too far back" for one of the objects.
Instead, I uninstalled all previous ports and removed the ports tree under /usr/ports. List installed ports by asking pkg to tell us which installed packages do not come from the OpnSense repository (those that do end with the repo string " OPNsense" so grep -v functions as a logical *not*:
Code Select
# pkg query --all '%o %R' | grep -v '\ OPNsense$'
sysutils/htop unknown-repository
net/arping unknown-repositoryRemove each non-OpnSense-precompiled package, e.g.:
Code Select
# cd /usr/ports/sysutils/htop && make deinstall && make cleanCode Select
# cd /usr/ports/net/arping && make deinstall && make cleanRemove the ports tree entirely:
Code Select
# rm -rf /usr/ports/Fetch the ports tree anew:
Code Select
# opnsense-code portsSwitch source to current version:
Code Select
# cd /usr/src
# git checkout stable/22.1
install dependencies if needed (if not needed, pkg will just let you know they're already the latest version):
Code Select
# pkg install autoconf automake libtool
Install htop:
Code Select
# cd /usr/ports/sysutils/htop
# make install clean
After that, htop is working beautifully again! Thanks OpnSense team!
"