SYSTEM Cited by 1 source
top (Linux)¶
What it is¶
top is the canonical interactive per-process resource
monitor on Linux — system load, per-CPU summary, memory, swap,
and a ranked list of processes by CPU / memory / I/O. Ships with
every Linux distribution; reads from /proc.
Strengths¶
- Single-screen summary that aggregates many signals: load average, task state counts, per-state CPU time breakdown, Mem / Swap totals, per-process detail.
- Sanity check. Run it last in the 60-second checklist to
see if anything is wildly different from the earlier commands.
If
vmstat/mpstat/pidstatpainted one picture andtoppaints another, load is variable and something is moving. - Interactive filtering. Sort by
M(memory),P(CPU),T(time); filter withu <user>; kill withk <PID>.
Weaknesses vs rolling tools¶
- Screen-clearing hides temporal patterns.
vmstat,pidstat,sargive you a row-per-sample scrolling history you can read as a time series.topshows the current snapshot only. - Hostile to copy-paste. The redraw hides most of what you want to capture in an incident record.
- Ctrl-S / Ctrl-Q pause dance. You can freeze with Ctrl-S and resume with Ctrl-Q to snapshot — but evidence of intermittent issues "can also be lost if you don't pause the output quick enough."
When to reach for top vs pidstat¶
- Interactive exploration (live incident on one host) →
top. - Capture for a ticket / runbook →
pidstat. - Historical comparison →
sar+pidstat -larchives. - Fleet-wide context → Atlas / Prometheus / Datadog — not a CLI tool at all.
Example output from the Netflix checklist¶
top - 00:15:40 up 21:56, 1 user, load average: 31.09, 29.87, 29.92
Tasks: 871 total, 1 running, 868 sleeping, ...
%Cpu(s): 96.8 us, 0.4 sy, 0.0 ni, 2.7 id, 0.1 wa, 0.0 hi, 0.0 si, 0.0 st
High load (31), us ≈ 97, sy ≈ 0.4, id ≈ 3, wa ≈ 0.1, no
steal — user-space-bound, confirmed across the 10 commands.
Seen in¶
- sources/2025-07-29-netflix-linux-performance-analysis-in-60-seconds
—
topis command #10 in the 60-second checklist. Netflix positions it explicitly as the final sanity check — "it can be handy to run it to see if anything looks wildly different from the earlier commands, which would indicate that load is variable."
Related¶
- systems/pidstat — rolling per-process cousin.
- systems/vmstat
- concepts/cpu-time-breakdown
- patterns/sixty-second-performance-checklist