Interview Prep/Linux/Processes, memory and OOM

`top` shows a process using 400% CPU. Is it broken?

BeginnerTroubleshootingProcesses, memory and OOM
Answer

Likely causes → top reports per-process CPU relative to a single core; 400% means four cores fully busy, normal for multi-threaded apps.

Diagnose →

nproc
top -H -p <PID>        # per-thread view

Fix → Nothing, if expected. If not, find hot threads with top -H and match TIDs to a thread dump (Java uses hex TIDs in jstack).

Prevent → Normalise CPU metrics by core count in dashboards.

All Linux questions Roadmap: Linux

More on Processes, memory and OOM