All articles

Linux Monitoring: Processes, Performance, and Hardware

Linux Monitoring: Processes, Performance, and Hardware

When a computer slows down, opening a random attractive monitor and watching moving graphs is not diagnosis. First define the question: is a process consuming CPU, is memory exhausted, is the disk blocked on I/O, is the network dropping packets, or is the processor reducing its frequency because of heat? Each problem needs a different tool.

I assembled a practical Linux monitoring toolkit, from standard top to btop, controlled CPU stress tests, graphical task managers, filesystem events, and Wi-Fi signal quality. This is not a ranking where number ten is worse than number one. It is a map of what to launch in a specific situation and which limitations matter.

top: the baseline available almost everywhere

On an unfamiliar server I start with top because it is usually installed and works through a basic terminal:

top

It shows load average, CPU, memory, and a process list. That is enough to spot an obvious anomaly: one process pins a core or the machine is deep into swap. Its interface is dense, however, and disk, network, and temperature data is limited or absent.

Remember that load average is not a CPU percentage. On Linux it counts runnable tasks and tasks in uninterruptible wait, including some I/O waits. High load with moderate CPU can therefore point to storage, network-mounted filesystems, or a stuck driver.

htop: working comfortably with processes

Use htop when the question is “Which process is hurting the system?” It provides search, sorting, a process tree, readable per-core meters, and signal controls without manually copying a PID.

# Debian / Ubuntu
sudo apt install htop

# Arch Linux
sudo pacman -S htop

The TERM signal asks an application to shut down cleanly and should normally come first. KILL stops it immediately, leaving no opportunity to save state or release resources. Do not turn Kill into a universal remedy. If systemd owns the service, it may start again immediately; investigate the unit and root cause instead of repeatedly killing the symptom.

btop: one terminal overview

btop is the application people often notice in my screenshots. It displays CPU, memory, disks, network, and processes together. You can hide panels, switch network interfaces, filter processes, and sort by CPU, memory, PID, user, or command.

# Debian / Ubuntu
sudo apt install btop

# Arch Linux
sudo pacman -S btop

Its strength is showing relationships quickly. A job starts, CPU and outbound traffic rise, and the same process moves to the top of the list. It remains an interactive overview, not long-term server monitoring: history disappears when the terminal closes. Week-long graphs and alerts need a persistent collector such as Prometheus or Netdata.

s-tui: CPU temperature, frequency, and stress testing

s-tui solves a narrower problem. It is not an htop competitor but a terminal workbench for CPU utilization, frequency, temperature, power, and thermal-throttling indicators. It includes a built-in stress test and can integrate with stress or stress-ng.

# Debian / Ubuntu
sudo apt install s-tui

# Arch Linux
sudo pacman -S s-tui

s-tui

I use it to evaluate cooling under controlled load: choose the worker count, limit test duration, and observe not only peak temperature but whether frequency falls after the machine heats up.

Do not casually run a stress test on an overheating laptop or a critical production server. Confirm that sensors are visible, fans work, and the test can be stopped quickly. Readings depend on hardware and permissions; a missing temperature does not mean the CPU is cold.

Graphical monitors for a desktop

For someone new to Linux, a terminal table may obstruct diagnosis. Mission Center or GNOME System Monitor is easier. Mission Center resembles a modern task manager, with separate views for CPU, memory, storage, network, and supported GPUs. GNOME System Monitor is simpler but often already integrated into the desktop.

NeoHtop offers a modern desktop interface, search by PID, name, or command, sorting, and process management. Download an official release: its author explicitly notes that third-party packages are community maintained and not endorsed by the project.

If you want the same terminal monitor on Linux, macOS, and Windows, try bottom (the btm command). It covers CPU, memory, network, disks, temperatures, and processes. I would choose between btop and bottom based on which one exposes the metric you need on your hardware, not on screenshots.

Question Tool
What is happening right now on an unfamiliar server? top
Which process consumes resources? htop
I want a broad terminal dashboard btop or bottom
Does the CPU throttle under load? s-tui
I want a familiar graphical task manager Mission Center / System Monitor / NeoHtop
Who changes files in this directory? inotifywait
Why is Wi-Fi unstable? wavemon

Filesystem events with inotify

A resource monitor cannot tell you who just changed a configuration file. Linux provides inotify, while inotify-tools exposes convenient inotifywait and inotifywatch commands:

sudo apt install inotify-tools

inotifywait -m -r \
  -e create,modify,move,delete \
  --format '%T %e %w%f' \
  --timefmt '%F %T' \
  /path/to/watch

This is useful when diagnosing a build process, synchronization, or unexpected directory changes. Inotify is not a complete security audit. The watcher must already be running, its event queue can overflow, and an attacker with equivalent privileges can stop it. System auditing needs auditd, centralized logs, and protection for the rules themselves.

Older Python examples often use Pyinotify. For a new project I would first evaluate maintained inotify-tools or Watchdog; an old package should not win merely because it appears in the first tutorial.

Wi-Fi signal quality with wavemon

When “the internet is slow,” a speed test mixes ISP behavior, remote-server load, and local radio conditions. wavemon displays the wireless interface, signal level and quality, noise, and connection parameters:

sudo apt install wavemon
wavemon

Do not focus on one number. Watch how signal changes when the laptop moves, whether quality jumps, and whether the expected interface is selected. The tool monitors Linux wireless devices; it does not replace packet analysis with Wireshark or tcpdump.

My Linux diagnostic order

When a system slows down, I do not install ten applications at once. My sequence is:

  1. uptime and top for load, CPU, memory, swap, and an obvious process.
  2. btop or htop to connect a process with network and disk activity.
  3. journalctl to inspect service and kernel events at that time.
  4. s-tui only when heat or frequency reduction is likely.
  5. inotifywait for unexplained file changes.
  6. wavemon when the problem appears specifically over Wi-Fi.

Do not begin by killing processes and clearing caches. First record the time, PID, command, resource usage, and relevant journal message. Otherwise you remove the symptom and lose your only chance to understand the cause.

When diagnosis involves valuable data, verify backups first. My guide to Syncthing and the 3-2-1 rule explains why synchronization cannot protect against accidental deletion and why recovery drills matter.

Limitations people forget

Inside a container, a monitor may show its cgroup limits rather than the entire host. Without root, some processes and counters are hidden. Temperature and power depend on the driver and CPU model. GPU metrics are especially inconsistent: an application may support one device perfectly and show nothing for another.

A missing value therefore means “unavailable,” not zero. Verify important observations through a second source: /proc, sensors, the kernel journal, or a vendor utility. A beautiful dashboard is only useful when you understand where its numbers come from.

Sources and further reading