How to monitor processes and system resources in real time?
Effective tracking of CPU, RAM, and disk subsystem resource consumption is critical for maintaining high performance of a server or workstation. Linux has a variety of tools for observing system status in real time.
The classic top utility is pre-installed in almost any distribution and displays a dynamic list of running processes ordered by CPU load. It allows you to quickly spot a problematic application and terminate it by sending the appropriate signal.
A modern and much more convenient alternative to the classic tool is the htop utility. It offers a color interface, mouse support, intuitive controls, and clear graphical load bars for CPU cores and memory right in the terminal window.
For deep performance analysis of individual subsystems, utilities from the sysstat package are used, such as iostat for disks and mpstat for processors. They are indispensable when looking for bottlenecks in application architecture and diagnosing hardware failures.
Tracking network activity in real time is conveniently done using the nload or iftop utilities. They clearly show incoming and outgoing traffic for each network interface and allow you to identify applications that are actively consuming the internet connection.