Checking CPU usage in Linux is one of the fastest ways to tell whether a slow system is actually short on processor time or is being held back by something else such as storage waits. When load average rises or interactive sessions start lagging, a quick CPU view shows whether work is consuming cores or mostly waiting elsewhere.
In Linux, top reads scheduler and process-accounting data from /proc/ and refreshes the display continuously. The header shows load average, task counts, and the overall CPU-time split, while the task table shows which commands are using CPU at that moment.
Top is part of procps-ng on most current Linux distributions, so it is usually available over SSH and on minimal server installs without extra setup. In containers, the header can still reflect host-level load averages even when the visible process list is namespaced, and top -b -n 1 is the simplest way to capture a copyable snapshot for tickets or incident notes.
Related: How to check load average in Linux
Related: How to view the process tree in Linux
Steps to show CPU usage in Linux with top:
- Start top to open the live CPU summary and process table.
$ top
The first lines show the current load average, total task counts, and the combined %Cpu(s) line for the system.
- Read the %Cpu(s) line near the top of the screen to see where total CPU time is going.
%Cpu(s): 2.9 us, 6.9 sy, 0.0 ni, 90.2 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
us and sy show active CPU work, id shows idle capacity, and wa shows time waiting for I/O completion.
- Press 1 to expand the combined CPU summary into separate lines for each CPU when one busy thread might be saturating a single core.
Per-CPU lines make it much easier to spot one pinned core on multi-core systems where the combined %Cpu(s) line still looks moderate.
- Press P if the current sort field has changed and the busiest processes are no longer at the top.
P sorts the task table by the %CPU column in descending order.
- Capture a one-shot snapshot when the output needs to be copied into a ticket, chat, or incident note.
$ top -b -n 1 top - 04:42:03 up 2 days, 15:14, 0 user, load average: 1.72, 2.19, 3.09 Tasks: 3 total, 2 running, 1 sleeping, 0 stopped, 0 zombie %Cpu(s): 2.9 us, 6.9 sy, 0.0 ni, 90.2 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st MiB Mem : 23744.6 total, 15630.3 free, 2793.1 used, 5676.7 buff/cache MiB Swap: 1024.0 total, 1024.0 free, 0.0 used. 20951.5 avail Mem PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 9 root 20 0 2272 1164 1076 R 100.0 0.0 0:01.22 yes 1 root 20 0 4036 3048 2784 S 0.0 0.0 0:00.01 bash 11 root 20 0 8492 4664 2688 R 0.0 0.0 0:00.00 topThe %Cpu(s) line shows the system-wide split, while the %CPU column identifies the process using that time.
- Press q to leave top when the check is complete.
Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.
