htop is an awesome and interactive system-monitor process-viewer. It acts as an alternative to the FreeBSD program top. It is a text-mode application and latest version works on FreeBSD based pfsense firewall too. This page explains how to install htop on pfSense.
Install htop on pfSense
You need to log in using ssh client:
Select option # 8 (shell).
pkg install htop
How do I use htop on pfSense firewall?
Simply type htop at the shell prompt (you may need to type rehash for the first time):
How do I show only processes of a given user?
To see only processes of a given user (say nixcraft), enter:
htop -u nixcraft
How do I show only the given PIDs?
The syntax is:
htop -p PID,[,PID,PID...]
htop -p 31151,24721
How do I disable color scheme?
To see a monochrome color scheme, enter:
pfSense htop keyboard shortcut keys
The following commands are supported while in htop:
|Up arrow key||Select (highlight) the previous process in the process list. Scroll the list if necessary.|
|Down arrow key||Select (highlight) the next process in the process list. Scroll the list if necessary.|
|Left arrow key||Scroll the process list left.|
|Right arrow key||Scroll the process list right.|
|PgUp, PgDn||Scroll the process list up or down one window.|
|Home||Scroll to the top of the process list and select the first process.|
|End||Scroll to the bottom of the process list and select the last process.|
|s||Trace process system calls: if strace(1) is installed, pressing this key will attach it to the currently selected process, presenting a live update of system calls issued by the process.|
|l||Display open files for a process: if lsof(1) is installed, pressing this key will display the list of file descriptors opened by the process.|
Other keyboard shortcuts
|u||Show only processes owned by a specified user.|
|M||Sort by memory usage (top compatibility key).|
|P||Sort by processor usage (top compatibility key).|
|T||Sort by time (top compatibility key).|
|F||“Follow” process: if the sort order causes the currently selected process to move in the list, make the selection bar follow it. This is useful for monitoring a process: this way, you can keep a process always visible on screen. When a movement key is used, “follow” loses effect.|
|K||Hide kernel threads: prevent the threads belonging the kernel to be displayed in the process list. (This is a toggle key.)|
|H||Hide user threads: on systems that represent them differently than ordinary processes (such as recent NPTL-based systems), this can hide threads from userspace processes in the process list. (This is a toggle key.)|
|p||Show full paths to running programs, where applicable. (This is a toggle key.)|
|Ctrl-L||Rfresh the screen.|
|F1||See this help menu.|
You learned how to install htop on pfSense firewall. htop command has many more option. Hence, see the htop home page online here or read man page by typing the following command:
🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
|Category||List of Unix and Linux commands|
|Firewall||Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04|
|Network Utilities||dig • host • ip • nmap|
|OpenVPN||CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04|
|Package Manager||apk • apt|
|Processes Management||bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time|
|Searching||grep • whereis • which|
|User Information||groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w|
|WireGuard VPN||Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04|