Shared server guidance · Question & answer

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.

BeginnerLinux VPS and dedicated servers with GNU utilities
Go to the answer

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.

Remote Linux shell
top

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

Remote Linux shell
mpstat -P ALL 1 5

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