How to show CPU usage in Linux

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.

Steps to show CPU usage in Linux with top:

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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 top

    The %Cpu(s) line shows the system-wide split, while the %CPU column identifies the process using that time.

  6. Press q to leave top when the check is complete.