Reading the Screen
Outcome: you can look at any btop screen and say, box by box, what the machine is doing — and spot which box holds the answer to "why is it slow?".
The default screen has four numbered
boxes. The numbers are not decoration:
the keys 1 to 4 toggle them (chapter
7), and each box's corner shows its
number so you always know which key owns
it. A fifth box, for a graphics
processor, appears on machines and
builds that support it (chapter 10). The
lab's terminal was made extra wide on
purpose — 176 columns — so this chapter
can show the boxes side by side; on an
ordinary terminal they stack and share
space, saying the same things smaller.
Across the very top sit the furniture:
a menu button, the preset name
(here a *, meaning the standard
layout), the machine's name, the clock,
and the update timer, - 2000ms + —
btop redraws every 2,000 milliseconds
(two seconds) unless you change it with
the + and - keys, which step it by
100 ms at a time.
Box 1: the processor
The processor box draws one graph per core, plus a summary. The lab machine has two cores and one deliberate busy loop, and its summary corner read:
╭─┐EPYC 9D25 126-┌─┐1.5 GHz┌╮
│CPU ■■■■■■■■■■■■■■■■■■ 78%│
│C0 ⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣸⣿ 90%│
│C1 ⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣸⣷ 67%│
│ Load avg: 2.23 0.97 0.59│
Read it as: the processor chip's name and speed; the total across all cores (78%); then one line per core — C0 at 90%, C1 at 67%, each with a trailing graph whose right edge is now and which flows leftwards as time passes. The load average underneath counts processes waiting to run, over the last 1, 5 and 15 minutes: on a two-core machine, a load of 2.23 means the queue is slightly longer than the machine can serve — busy, not yet drowning. The braille graph is not decoration: a core pinned at the top for minutes at a time looks different from a spiky one, and the difference is often the whole diagnosis.
In the box's top edge are two switches worth knowing: per-core toggles whether the process list (box 4) counts a process's processor use against one core or against all cores — the same process can honestly read 90% one way and 45% the other on a two-core machine, and chapter 11 returns to the confusion that causes. This guide leaves it off, so process percentages are shares of the whole machine.
Box 2: memory, with disks inside
Memory is drawn as labelled bars with a graph of recent use:
│ Total: 7.74 GiB │
├─Used:──────────────────────6.79─GiB─┤
├─Cached:────────────────────1.04─GiB─┤
├─Free:───────────────────────193─MiB─┤
Total is what the machine has. Used is what programs are actually holding. Cached is memory the system is lending to keep copies of files for speed — it is reclaimable: if a program needs it, the cache shrinks. Free is what is doing nothing at all, and a small Free number is normal on Linux, which would rather cache than idle. The honest "can I run one more thing?" number is the Available line (975 MiB, 12%, in the same capture): used plus everything reclaimable, accounted properly. The lab machine, at 88% used, was genuinely full — its own doing, as chapter 4's 200 MB tenant will show.
The right half of box 2 is the disks
panel: each mounted disk with its size,
how full it is, and how busy it has been
(the io button switches it into a
big-graph mode, and the d key toggles
the whole disks view). In every lab
capture that panel is empty, and that
is the truth about the lab machine, not
a printing error: it is a container
whose only mounts are an overlay
filesystem and temporary filesystems —
no ordinary disks for btop to list.
Chapter 11 names this as a known
container trait. On a normal machine,
expect one entry per disk or partition.
Box 3: the network
The network box graphs one interface at
a time (the b and n keys move
between interfaces, and the box header
names the current one — here an
interface whose address is shown as
198.19.0.2):
╭─┐³net┌┐198.19.0.2┌───────────────────────────┐sync┌┐auto┌┐zero┌┐←b host0 n→┌╮
│ ⣿╭─┐download┌──────────────╮│
│ ⣿│▼ 1.04 MiB/s (8.37 Mibps)││
│ ⣿│▼ Top: (8.37 Mibps)││
│ ⣀⣿│▼ Total: 260 MiB││
│ ⣿│▲ 12.6 KiB/s (101 Kibps)││
│ ⣿│▲ Total: 2.09 MiB││
│ ⣿╰─┘upload└────────────────╯│
Download (▼) and upload (▲) each get a
current rate, a Top — the fastest
rate since btop started watching (the
zero button, or z, resets it) — and
a Total transferred since the
machine booted or the counter was reset.
At the moment captured, something was
genuinely arriving at about a megabyte
per second while almost nothing left:
the shape of a machine downloading, not
serving. The graph's scale (10K at the
edges here) adjusts itself unless you
pin it with the auto switch.
Box 4: the processes
The list is the heart of btop, and most of this guide lives here. Its columns:
- Pid — the process's number, unique for as long as it lives.
- Program — the short name of the program.
- Command — the full command line it was started with, cut off at the box's edge.
- Threads — how many parallel strands the process runs.
- User — who owns it.
- MemB — memory held, in bytes with a unit (M for megabytes).
- Cpu% — processor use, drawn with a small graph of its own so a rising process shows a rising edge.
Under the header, buttons name the
chapter-4 and 5 skills before you learn
them: filter, pause (the u key
freezes the list), per-core, reverse,
tree, and the sort control —
← cpu lazy → on the lab screen, which
says the list is sorted by processor use
and the arrow keys will change that.
Along the bottom of the whole screen, a
footer belongs to the list too: select
(the arrow keys), info ↵, terminate,
kill, signals, Nice, Follow, and
at the far right a counter like 0/15:
which row is selected, out of how many
are shown.
Check: point at each box on your own screen and say what question it answers — how busy, how full, how fast, who. Chapter 4 puts box 4 to work.