How do I check CPU usage on a Linux server without interrupting workloads?
CPU utilisation needs a time window and workload context. A busy processor may be doing useful work, while a server with low average CPU can still have one saturated core or blocked requests. Begin with read-only sampling during the reported slowdown rather than immediately stopping the busiest process.
Before you start
- Authorised server shell; sysstat is installed for mpstat.
Instructions
1. Watch the live process view
Use top interactively and press q to exit. The summary separates user, system, idle and other CPU states; the process list helps identify candidate workloads.
topObserve several refreshes and correlate the time with the affected application. Do not use top’s process-control shortcuts during an observation-only check.
2. Sample each presented processor
Where the sysstat package is installed, collect a short per-CPU sample. A bounded run is easier to compare with application latency than an indefinite terminal stream.
mpstat -P ALL 1 5This produces five one-second reports. Compare per-CPU activity and averages instead of interpreting aggregate utilisation as proof that every core is equally busy.
Check the result
- The sample covers the actual slowdown and identifies whether CPU pressure is sustained, localised to a core or associated with another CPU state.
Troubleshooting
- CPU is low while requests are slow
- Investigate storage, network, locks, external dependencies and configured concurrency limits.
- One process shows more than 100% CPU
- Some tools express multithreaded usage relative to one logical CPU. Check the display convention and available processor count.
Official references
Use the documentation for your installed version when a flag, service name or platform feature differs.
