Pcornel
Browse topics
Options
Recent
Favorites
Linux · Technical reference

CPU

Direct answer

CPU monitoring shows how busy the processors are and why: user (us), system (sy), I/O wait (wa), steal (st, a VM waiting for the hypervisor) and idle (id), per CPU and per process.

When to use this

Use it when a system is slow or a process uses too much CPU.

First 30 seconds

1. top — which process and which state (us/sy/wa/st)?

2. mpstat -P ALL 1 — one core saturated or all?

3. wa high → disk; go to Disk.

4. st high → hypervisor contention.

5. Process: pidstat -u -p <pid> 1 and its logs.

Operational verification

workload → CPU time split (us/sy/wa/st/id) → per core and per process → cause identified

Evidence · next step

For Resource Monitoring → CPU, continue with the first unproven Topic check: Record CPU count/topology, VM steal context, workload concurrency and baseline utilization for the exact incident interval. If that boundary is healthy, advance to the adjacent check: Sample per-CPU user/system/idle/iowait/steal, run queue and context-switch/interrupt activity across multiple intervals. Preserve the same host/time/identity scope and rerun the original workload before accepting recovery.

Continue only after interpreting the current observation.
Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
linux
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

Platformlinux
Scope / prerequisiteUse it when a system is slow or a process uses too much CPU.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

6 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Operational evidence path Verify boundary

workload demand → scheduler runnable queue → logical CPU execution or steal/IRQ pressure → process/thread/cgroup attribution → service latency/throughput → workload acceptance

Healthy evidence: per-CPU demand is balanced or intentionally pinned, runnable queues remain bounded, steal/IRQ pressure is acceptable and workload latency/throughput meets baseline.

Step 2 Verification and output interpretation Verify boundary

Verification path. Establish a time window and correlate CPU, run queue, memory pressure/reclaim/swap, block latency/queueing and kernel/hardware events.

Existing fast checks for this Topic. - Record CPU count/topology, VM steal context, workload concurrency and baseline utilization for the exact incident interval.

  • Sample per-CPU user/system/idle/iowait/steal, run queue and context-switch/interrupt activity across multiple intervals.
  • Attribute CPU to process/thread/cgroup and inspect affinity, priority, IRQ/softirq or throttling evidence where the pattern requires it.
  • Reduce or correct the demonstrated contention, then repeat the workload and verify both CPU/scheduler metrics and service latency/throughput.

Verification chain. workload demand → scheduler runnable queue → logical CPU execution or steal/IRQ pressure → process/thread/cgroup attribution → service latency/throughput → workload acceptance

Step 3 Verification path Verify boundary

Exercise one safe negative or boundary case implied by OOM kill, CPU/memory pressure, cgroup throttle, zombie/stuck task, namespace mismatch, missing kernel module/device, container limit conflict or virtualization capability mismatch.

Step 4 Failure modes and next checks Narrow the fault

Suspicious evidence: one or more CPUs saturate with growing runnable queues, steal time rises, IRQ/softirq dominates, throttling/affinity concentrates work, or CPU spikes align with workload latency regressions.

Step 5 Common mistakes Narrow the fault
  • Average CPU hiding one saturated core.
Step 6 Where it fails Narrow the fault

Common failure classes are OOM kill, CPU/memory pressure, cgroup throttle, zombie/stuck task, namespace mismatch, missing kernel module/device, container limit conflict or virtualization capability mismatch.

Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points

High wa means waiting for disk, not CPU shortage. High st in a VM means the host is overcommitted. One process at 100 % on a multi-core system may be single-threaded and limited by one core — check per-CPU with mpstat -P ALL.

Key checks
  • mpstat -P ALL 1 — per-core CPU (sysstat)
  • top -o %CPU / htop — live CPU and memory per process
  • vmstat 1 5 — CPU, memory, swap and I/O over time
  • free -h — memory and swap
  • iostat -xz 1 3 — disk utilisation and latency (sysstat)
  • uptime — load averages
ReferenceWhat it is1 section · depth on demand

Core model

Establish CPU topology and virtualization context, then sample user/system/idle/iowait/steal plus per-CPU distribution and runnable queue over the incident interval. Attribute consumers to processes/threads/cgroups, inspect priority/affinity and IRQ/softirq pressure when needed, and compare to workload latency or throughput before concluding CPU is the limiting boundary.

ReferenceWhy it matters1 section · depth on demand

Overview

CPU monitoring:

mpstat -P ALL 1 5             # per-CPU usr/sys/iowait/steal/irq
top (1 = per CPU, H = threads)
pidstat -u 1 5
sar -u 1 5; sar -u -f /var/log/sa/sa05    # history (sysstat)
perf top
cat /proc/pressure/cpu
lscpu | grep -E 'Model name|^CPU\(s\)|Thread|NUMA'

Interpretation: %iowait is idle time waiting for I/O (not CPU work); %steal is time taken by the hypervisor; high %soft points at network packet processing. Check CPU frequency scaling (cpupower frequency-info) when performance varies.

ReferenceImportant terms & boundaries5 sections · depth on demand

What this shows and what it does not

CPU bottleneck evidence requires sustained or burst-aligned scheduler/CPU pressure correlated with the workload and attributable to the relevant execution context; utilization alone does not show causation.

In depth

CPU usage and saturation

To understand CPU problems, separate how busy the CPUs are (utilisation) from how many tasks wait for them (saturation). The vmstat(8) manual page defines the fields that show both:

  • r counts runnable processes, running or waiting for a CPU, and b counts those blocked on I/O.
  • in and cs show interrupts and context switches per second.
  • us, sy, id, wa and st split CPU time into user, kernel, idle, I/O wait and stolen.
  • The first line is an average since boot. Only the following lines describe the sampling interval.

top(1) adds the niced, hardware-interrupt and software-interrupt shares.

Reading CPU figures

ObservationInterpretation
r consistently above the number of CPUsCPU saturation: tasks are queueing
us highApplication work: profile the application
sy highKernel work: system calls, locks, networking, page faults
wa high, r lowWaiting for storage; not a CPU problem
st above a few percentThe hypervisor gives this VM less CPU than requested
One CPU at 100 %, the others idleA single-threaded bottleneck, or interrupt affinity
cs very highLock contention, or many tiny tasks

Tools by question

QuestionTool
Per-CPU usagempstat -P ALL 1, top + 1
Which processes use the CPUpidstat -u 1, top -o %CPU
Which threadstop -H -p <pid>, pidstat -t -p <pid> 1
Where the time goes in the codeperf top, perf record -g -p <pid>
Waiting for CPUPSI /proc/pressure/cpu, vmstat r
CPU frequency throttlingturbostat, /sys/devices/system/cpu/*/cpufreq
host$ nproc
8
host$ vmstat 1 5
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 2  0   1944 612340 102344 19476120    0    0    41   212  402  811  9  2 88  1  0
14  0   1944 611988 102344 19476200    0    0     0   180 8812 21033 86 12  2  0  0
15  0   1944 611512 102344 19476300    0    0     0   204 8920 20871 87 11  2  0  0
host$ mpstat -P ALL 1 1 | tail -4
host$ pidstat -u 1 3 | sort -k8 -nr | head -3
host$ sudo perf top -p "$(pgrep -o report-api)"

Reading vmstat

Ignore the first line (since boot). In the live samples, r is 14–15 on an 8-CPU host, and idle time is 2 %. That's real CPU saturation, driven mostly by user time. The next step is to find the process with pidstat, then the code path with perf.

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

How it works at runtime

CPU is part of Resource Monitoring → CPU. CPU monitoring distinguishes aggregate utilization from per-CPU saturation, runnable demand, scheduler delay, steal time, interrupt/softirq load and process or cgroup attribution so CPU-related workload latency can be confirmed rather than inferred.

Runtime state ownership and mechanics. Kernel and resource observations combine scheduler run queues, CPU time, memory reclaim/page cache, virtual memory, block I/O, device drivers, interrupts and hardware error reporting. Load average is runnable plus uninterruptible work, not CPU percentage. /proc and /sys are exported runtime interfaces whose fields can be architecture/kernel-version specific.

Topic-specific state model. CPU monitoring distinguishes aggregate utilization from per-CPU saturation, runnable demand, scheduler delay, steal time, interrupt/softirq load and process or cgroup attribution so CPU-related workload latency can be confirmed rather than inferred.

Technical metadata. Host/VM, distribution, boot ID, kernel release, CPU topology, cgroup/namespace, workload/process/thread, CPU user/system/idle/iowait/steal + run queue/load, memory available/reclaim/swap/fault/OOM, block device/LV/MD latency/queue/throughput, PCI/USB/DMI identity, module/driver/parameters, procfs/sysfs path, kernel logs and original workload result.

Interpretation rule. - 100% on one CPU ≠ all CPUs are saturated.

  • High CPU utilization ≠ CPU is the workload bottleneck if latency is dominated by I/O, locks or external dependencies.
  • Low idle time ≠ useful application work; system, IRQ, softirq and steal time have different meanings.
  • A top process by CPU ≠ root cause; it may be expected load or downstream spinning caused by another failure.

Mechanics

For Resource Monitoring → CPU, stable identity is host + PID/process/cgroup/namespace + CPU/memory/device + workload identity.

Important negative cases include OOM kill, CPU/memory pressure, cgroup throttle, zombie/stuck task, namespace mismatch, missing kernel module/device, container limit conflict or virtualization capability mismatch.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Limits and how it fails

Primary failure point. CPU bottleneck evidence requires sustained or burst-aligned scheduler/CPU pressure correlated with the workload and attributable to the relevant execution context; utilization alone does not show causation.

Model. High load can be I/O wait or blocked tasks with modest CPU utilization. “Free memory” is not the same as available memory because Linux uses cache aggressively.

ReferenceConfiguration & state1 section · depth on demand

Configuration, persistence and lifecycle

Distribution/platform context. CPU owns host CPU/scheduler observation. Processes owns process lifecycle; cgroups/resource limits may constrain execution; virtualization owns host/guest steal causes; applications own request-level profiling.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor doclinux current

Authoritative/upstream documentation reviewed for bounded claims in Resource Monitoring → CPU. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://gitlab.com/procps-ng/procps · confidence 94%
Technical changelog & impact

What changed and what may be affected

Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.

Related reference impactReview these references after material technical changes when their shared boundary is affected.
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
linux cpu monitoringcpu saturation linuxlinux cpu usagerun queue cpu linux
Embedded reference data

Quick lookup tables

CPU operational reference

Topic-specific lookup boundaries, proof limits and next-step Evidence for CPU.

Lookup boundaryTopic-specific referenceOperational use
Scope / effective stateCPU monitoring distinguishes aggregate utilization from per-CPU saturation, runnable demand, scheduler delay, steal time, interrupt/softirq load and process or cgroup attribution so CPU-related workload latency can be proven rather than inferred.Establish exactly what this Topic owns before crossing into another subsystem.
Fast verificationPin exact symptom + interval → identify host/VM, workload and authoritative kernel/device/resource scope → capture correlated runtime telemetry/state → attribute the abnormal signal to process/cgroup/device/driver → find first failed boundary → change one demonstrated cause → read back effective state → repeat original workload + regression check.Use the shortest evidence path first; a fast check is a boundary test, not blanket proof.
Verification chainworkload demand → scheduler runnable queue → logical CPU execution or steal/IRQ pressure → process/thread/cgroup attribution → service latency/throughput → workload acceptanceTrace requested/configured state through effective state to the observed workload result.
Failure boundaryCPU bottleneck proof requires sustained or burst-aligned scheduler/CPU pressure correlated with the workload and attributable to the relevant execution context; utilization alone does not prove causation.Stop broad troubleshooting at the first boundary that is not supported by evidence.
Positive evidenceCorrelated Linux resource/kernel evidence can establish this proof path: workload demand → scheduler runnable queue → logical CPU execution or steal/IRQ pressure → process/thread/cgroup attribution → service latency/throughput → workload acceptanceUse this observation only for the specific claim it actually supports.
Evidence limitIt does not independently prove behavior outside the captured host/VM, boot, incident interval, namespace/cgroup, process, device, kernel/driver or workload scope. CPU bottleneck proof requires sustained or burst-aligned scheduler/CPU pressure correlated with the workload and attributable to the relevant execution context; utilization alone does not prove causation.Do not promote a local success signal into end-to-end or adjacent-dependency proof.
Next troubleshooting checkContinue from the first unproven resource/kernel boundary: preserve the exact incident scope, capture the adjacent process/cgroup/device/driver or subsystem state, change only the demonstrated cause, then repeat the original workload and regression checks.Continue to the next unresolved boundary while preserving the original test condition.

CPU · operational reference

Compact Linux state, persistence, verification and boundary reference for fast lookup.

Reference boundaryCPU
Topic pathResource Monitoring → CPU
Runtime stateCPU monitoring distinguishes aggregate utilization from per-CPU saturation, runnable demand, scheduler delay, steal time, interrupt/softirq load and process or cgroup attribution so CPU-related workload latency can be proven rather than inferred.
Fast checks- Record CPU count/topology, VM steal context, workload concurrency and baseline utilization for the exact incident interval. - Sample per-CPU user/system/idle/iowait/steal, run queue and context-switch/interrupt activity across multiple intervals. - Attribute CPU to process/thread/cgroup and inspect affinity, priority, IRQ/softirq or throttling evidence where the pattern requires it. - Reduce or correct the demonstrated contention, then repeat the workload and verify both CPU/scheduler metrics and service latency/throughput.
Verification chainworkload demand → scheduler runnable queue → logical CPU execution or steal/IRQ pressure → process/thread/cgroup attribution → service latency/throughput → workload acceptance Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary. Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return path or regression → explicit Evidence boundary.
Failure boundaryCPU bottleneck proof requires sustained or burst-aligned scheduler/CPU pressure correlated with the workload and attributable to the relevant execution context; utilization alone does not prove causation. Boundary chain: process/context → userspace configuration → kernel subsystem/resource → device/network/filesystem dependency → effective state → original workload.
Persistence ruleProve which configuration source owns the state, then prove that the running consumer loaded or generated the intended state.
Depth when you need it

Deep reference

Healthy vs suspicious evidence

Commands

mpstat -P ALL 1 3
top -1
Confirmation

Confirm action

Continue?