Monitoring CPU, RAM and server load

Check CPU and RAM usage and system load on a Linux VPS with top, htop and free, to diagnose slowness.

Updated

An overview with top

The command built into every Linux system for a quick overview:

top

Shows overall CPU and RAM usage in real time, along with the processes consuming the most. Press q to quit.

A more readable view with htop

htop offers a clearer interface, with progress bars and navigation by mouse or keyboard:

sudo apt install htop
htop

Checking available memory

free -h

Shows total, used and available RAM, as well as swap (backup memory on disk, used when physical RAM is saturated).

Understanding system load (load average)

top and htop also display the load average: an average of the number of processes waiting for CPU resources, over 1, 5 and 15 minutes. As a rule of thumb, a load below the number of available CPU cores is healthy; a load that stays above it indicates a machine undersized for its current use.

Identifying a process consuming too much

Once the problematic process has been identified (through top/htop), its name or PID lets you investigate more precisely — the logs of the application concerned, a configuration to review, or quite simply a one-off traffic spike worth watching over time before concluding there is a real problem.

Can’t find your answer?

The team answers tickets seven days a week, and the Discord is open to everyone.