MainspringGuides › top command
macOS Guide

top on Mac: Check CPU and Memory From Terminal

Updated July 2026 · 3 min read

top is the Terminal's live system monitor: a self-refreshing table of every process with its CPU, memory, and state. It ships with every Mac, works over SSH, and keeps working when the rest of the system is too busy to draw a window. Here's how to read it — and when to reach for Activity Monitor instead.

Run top and sort it by what matters

Open Terminal and type top. By default, macOS sorts the table by process ID, so whatever launched most recently sits at the top — which tells you nothing about load. Sort by usage instead:

# heaviest CPU users first
top -o cpu

# biggest memory users first
top -o mem

Press q to quit. If top is already running, press o, type cpu or mem, and hit Return to re-sort without restarting. For a one-shot snapshot you can paste into a note or capture in a script, use logging mode:

# one sample, first 12 lines, then exit
top -l 1 | head -n 12

Two more habits worth forming. The display refreshes every second by default, which is hard to read on a busy machine — top -s 5 slows it to a five-second cadence. And treat any single reading with suspicion: a process legitimately spikes while launching or indexing a new file, so judge by what stays at the top across several refreshes, not by whatever happens to be there the moment you look.

Read the header before the process list

The block above the table answers most "why is my Mac slow?" questions on its own:

One number that confuses everyone: a single process can show more than 100% CPU. The percentage is per core, so 300% simply means the equivalent of three cores working — routine for a video export, alarming for a menu bar utility. And if kernel_task dominates the list on a warm MacBook, that's usually macOS deliberately soaking up CPU time to manage heat rather than a runaway process; clear the vents, let it cool, and check again before assuming something is broken.

Find one process without scanning the list

top shows everything. When you're hunting a single app, pipe ps through grep instead, then act on the process ID in the second column:

# find the process ID (second column)
ps aux | grep -i safari

# quit it politely; use -9 only if it ignores you
kill 1234
kill -9 1234

The grep command matches itself, so ignore the output line that ends in grep -i safari. Prefer plain kill, which sends a normal termination request; kill -9 ends the process instantly with no chance to save work.

When Activity Monitor is the better tool

top is unbeatable over SSH, in scripts, and when the GUI is beachballing. For everything else, Activity Monitor (in Applications → Utilities) shows things top doesn't: per-process GPU usage, the Energy tab that names battery hogs, disk and network bytes per process, and one-click force quit. A good rule: diagnose casually in Activity Monitor, and keep top for when you need numbers fast, remotely, or on a machine that won't cooperate.

Prefer switches to syntax?

Terminal is great for diagnosis, less great for remembering flags. Mainspring turns 90+ hidden macOS settings into labelled, reversible toggles — flip what you want, undo anything with one click.

Try Mainspring free →

Signed & notarized by Apple · 1-day free trial · $29 once

Slow Mac but a calm top?

If the CPU column looks quiet while the Mac still crawls, the bottleneck is usually memory or disk rather than processing. Check the VM line for swap activity, then see our guide to tracking down high CPU usage on a Mac for the process-by-process elimination routine.