Skip to main content
To find what is using high CPU on Linux, run top and press P to sort by %CPU, or run pidstat -u 5 1 for a five-second average per process. The process at the top is your cause. Also check the %Cpu(s) line: high us means a program, high sy the kernel, high wa the disk, and high st CPU time taken by the hypervisor on a virtual server.

Before you start

  • Connect with SSH. If the server is too slow to log in, use the VPS VNC console.
  • Commands that act on other users’ processes need sudo; root can leave it out.
  • Install sysstat for pidstat and mpstat:

How to find the process using the most CPU

1

Open top

top sorts by %CPU by default. If someone changed it, press P (capital) to sort by CPU again, M for memory. Press 1 to show each core separately and q to quit.
2

Read the summary line

The table below tells you what each part means.
3

Note the PID and command

The first row shows the busiest process. Press c to see its full command line, which tells you, for example, which PHP script or Java server it is.

How to get an average instead of a snapshot

top refreshes every few seconds, so a short spike can mislead you. pidstat averages over an interval:
%CPU is per core, so on a 4-core server a process can reach 400%. %wait is time the process was ready to run but waiting for a CPU. To see each core:
One core at 100% while the others idle means a single-threaded program has hit its limit; more cores won’t help that program.

Why ps shows a different CPU number

This is useful for a quick list, but ps calculates %CPU as total CPU time divided by how long the process has existed. A process that has been busy for the last minute but idle for a week shows a low value. Use top or pidstat for what is happening now.

How to find CPU usage per service

On servers with systemd, see which service (with all its child processes) uses the most CPU:
This catches services that start many short-lived processes, such as PHP-FPM pools or cron-launched scripts.

Common causes and fixes

To stop or slow a process:
Don’t kill a process you don’t recognise on a production server until you know what it is. Run ls -l /proc/1185/exe and systemctl status 1185 to see which file and service it belongs to.

How to check it worked

Run pidstat -u 5 1 again. The process should be gone or much lower, and the id (idle) value in top should rise. The load average falls over the next few minutes (see what is load average).

Frequently asked questions

Why does top show more than 100% CPU for one process?

%CPU is per core. A program using 3 cores fully shows 300%. Press Shift+I in top to switch to Solaris mode, which divides by the number of cores.

What is a normal CPU steal time?

Close to 0. Occasional small values are normal on any virtual server. If st stays high while your own processes are quiet, note the times and contact support.

How can I see which process used CPU in the past?

top only shows now. Install a monitoring tool such as Netdata or Prometheus and Grafana to keep history. The VPS Panel graphs show total CPU over time.

VPS and dedicated server guides

Every server guide in one place.

Monitor resources with htop

Interactive process viewer.

Fix high load

Step-by-step troubleshooting.

Limit CPU and memory

CPUQuota, nice and cgroups.

Kill a process

Stop a runaway program.

Checked against the top(1), ps(1), pidstat(1) and systemd-cgtop(1) manuals on 4 November 2026; top, ps, pidstat and mpstat tested on Ubuntu 24.04 LTS. Commands can differ on other distributions or releases.

Need Extra Help?

If you encounter any issues, our support team is ready to assist:

Save on Your Hosting

Ready to upgrade your hosting? Use code KB20 at checkout for 20% off your first order!

Last Updated: November 2026