Monitoring processes on Raspberry PI remotely with Runlet and htop
htop is an interactive text-mode process viewer for Unix systems that is highly configurable and gives the option to view information such as CPU load, memory consumption, hostname, tasks, load averages, and uptime. It can be used alongside Runlet to monitor Raspberry PI processes remotely.
This example assumes that Runlet is installed and ready to use on all devices. Please refer to our documentation at https://runlet.app/docs for more information on how to get started.
The first step is to get the Raspberry PI name on the network, which is raspberrypi_ginger. This name is generated automatically by the API when you log in to your account, and the device joins the network.
We can now create a job called pi-htop that runs the command htop only on raspberrypi_ginger. The command export TERM=xterm-256color ensures that the terminal emulator is set before htop, but it’s not mandatory.
The job pi-htop shows up in the list of available jobs when saved, and can be triggered with ease by any online device using either a desktop manager or the CLI command runlet @run pi-htop.
The initial output of htop shows a list of system processes including PID, user, percentage of CPU and memory used, time in execution, and command.
The next image shows all the setup options displayed after pressing key F2. These options can customize meters shown at the top, as well as change display options, colors, and active columns. Navigation using arrow keys is done with no hassle as all keyboard strokes are captured. The key F10 can be pressed at any time to indicate that the setup is done and return to the previous screen.
We can also filter processes by keyword pressing F4 on the main screen, which is particularly useful to find and kill undesired processes.
You can contribute to Runlet by submitting bug reports and feature requests on GitHub.