Spring Fresh Sale! - Up To 67% OFF BDIX Hosting + Free Domain
Linux

How to Monitor Server Load and Processes with top and htop

When a Linux server feels sluggish, you want to see what it is doing right now. Two tools give you a live window into that: top, which comes with every server, and htop, a friendlier colour version. They show CPU load, memory use, and — crucially — which processes are responsible.

You will need SSH access for these.

Step 1: Run top

Simply type:

top

The top few lines summarise the system; the list below shows processes sorted by CPU use. Press Shift+M to sort by memory instead, and q to quit.

What the numbers mean

  • Load average — three numbers for the last 1, 5 and 15 minutes. As a rough rule, a load near your CPU core count is busy; well above it means the server is struggling.
  • %CPU / %MEM — how much of each a process is using. The heaviest sits at the top.
  • us / sy / wa — user, system and I/O wait. A high wa means the disk, not the CPU, is the bottleneck.

Step 2: Try htop for an easier view

Install it if needed:

sudo dnf install htop (AlmaLinux/CentOS) or sudo apt install htop (Ubuntu/Debian)

Then run htop. You get colour bars per CPU core, easy scrolling, and the ability to search and kill a runaway process by pressing F9.

Turning findings into fixes

Spotted one process pinning the CPU? That is your lead. If it is a web or database process, the cause is often on the site itself — our guide on diagnosing high CPU and memory usage covers what to do next.

Frequently asked questions

My load average is high but CPU looks idle. Why?

Load counts processes waiting on the disk too, not just CPU. A high load with low CPU and high wa points to a storage bottleneck — check disk activity and consider what is doing heavy reads or writes.

Is it safe to kill a process from htop?

You can, but be careful — killing the wrong service can take a site offline. Identify the process first, and prefer restarting the service cleanly over force-killing where possible.

How do I see memory pressure clearly?

Alongside top/htop, run free -h for a clean snapshot of memory. If you are constantly out of RAM, a swap file can provide a safety buffer.

Was this article helpful?