One-Shot CPU Snapshot with top

Print a single top-style report sorted by CPU instead of watching a live updating screen.

macOSProcessesmonitoringcpuLow risk
Run top -l 1 -o cpu to take one sample and print processes ordered by current CPU usage, heaviest first.

01Command

Command
$ top -l 1 -o cpu

02What it does

By default top redraws the terminal continuously, which is awkward in scripts and screenshots. The -l 1 option puts it in logging mode: it takes exactly one sample, prints the report, and exits. Adding -o cpu sorts the process table by CPU usage so the busiest processes appear at the top of the list.

03Risk

RiskLow risk
!Warning: The very first -l sample often shows low or zero CPU percentages because macOS top needs two samples to compute usage deltas; run top -l 2 and read the second, or use -stats pid,command,cpu to trim the columns.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • top — display and update sorted information about processes (macOS)
    SS64 · technical · 2026-09-17
    Evidence: The page documents -l for logging mode (one shot) and notes that -u is an alias equivalent to "-o cpu -O time", confirming -o cpu sorts by CPU usage.
  • top(1) man page
    manpagez.com · technical · 2026-09-17
    Evidence: The synopsis shows -l <samples> ("Use logging mode and display <samples> samples") and -o <key> for the sort-order column, with cpu as a valid key.

Last verified: 2026-09-19 · Category: System & Settings