37.2 Real-time System Monitoring with htop
As outlined in the chapter entitled “An Overview of the Ubuntu Cockpit Web Interface”, the Cockpit web interface can be used to perform some basic system monitoring. The previous section also explained how the GNOME System Monitor tool can be used to monitor processes and system resources. In this chapter we have also explored how the ps command can be used to provide a snapshot view of the processes running on an Ubuntu system. The ps command does not, however, provide a real-time view of the processes and resource usage on the system. To monitor system resources and processes in real-time from the command prompt, the htop command is an ideal tool. Though not generally installed by default, htop may be installed as follows:
# apt install htop
Once installed, launch htop as follows:
$ htop
When running, htop will list the processes running on the system ranked by system resource usage (with the most demanding process...