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
sysstatforpidstatandmpstat:
- Ubuntu / Debian
- AlmaLinux / Rocky
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
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:
Why ps shows a different CPU number
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:Common causes and fixes
To stop or slow a process:
- Stop a service cleanly:
sudo systemctl stop name, or restart it withrestart. - Lower its priority:
sudo renice -n 10 -p 1185. - Cap it permanently: see limit CPU and memory for a process.
- End a stray process: see kill a process.
How to check it worked
Runpidstat -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 to0. 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.
Related guides
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:- Live Chat: Quick assistance via our website.
- Support Ticket: Open a Ticket
- Discord: Join our Community
- Email: support@freakhosting.com
Last Updated: November 2026