What btop Is
Every running program on a computer is a process: it has a number (its PID, short for process ID), an owner, a share of the processor's time, and a share of the memory. A typical machine has hundreds of them, most asleep, a few busy, and — on a bad day — one or two using far more than their fair share while everything else waits.
btop is a program that draws all of that on one terminal screen, and keeps redrawing it. It is a resource monitor. Across the top, a graph of processor (CPU) use, core by core. Below it, bars for memory — how much is used, cached, and free — a panel for the disks, and one for the network: what is arriving and leaving, and how fast. Most of the screen belongs to the process list itself: every process, its PID, its owner, its memory, its processor use, refreshed every couple of seconds, sorted so the busiest float to the top.
That is the whole idea, and it is a good one: most "the machine is slow" mysteries are one glance away from being solved, once the glance shows the right things together. The processor graph says whether the machine is busy; the process list says who is making it busy; the memory bars say whether the machine is also full. btop's job is to put those three answers in one place and keep them current.
Why a whole program for this
Your system already has simpler tools.
top shows a process list, free shows
memory, and the Watching Your System
guide in this series teaches them
properly. btop earns its install with
three things those tools do not combine:
- History you can see. Each box carries a graph, not just a number, so "busy" becomes "busy for the last minute, in spikes, on one core" — the shape often names the culprit before the numbers do.
- A list you can work in. Sort by any column, filter by name, unfold the tree of which process started which, and act on the one you picked — all without leaving the screen.
- A screen you can shape. Boxes can be hidden, rearranged into saved layouts, recoloured with themes, and every choice is kept in a plain-text file you can read and edit (chapter 8).
A first taste
After installing (chapter 2), run:
btop
Wait for the second refresh — the first screen is drawn before a full interval of measurements exists. On the lab machine, with a test process deliberately burning one processor core, the process box's first rows looked like this:
Pid: Program: Command: Threads: User: MemB
68456 press-worker ./press-worker 1 root 1.3M
32 hatch /opt/hatch/bin/hatch daemon --runt 14 root 396M
68503 bun /home/hatch/workspace/build-check/ 7 root 33M
68460 python3 python3 -c blob = bytearray(200*1 1 root 209M
press-worker was the lab's own busy
loop (a copy of the humble yes program
under a clearer name): Chapter 3 reads
this list column by column, and chapter
5 stops that very process from inside
btop. Quit with q when you are done
looking — and notice that how you
leave matters to what btop remembers;
chapter 8 explains.
Who it is for
The person whose laptop fan starts for no visible reason. The home-server owner asking why the little box in the corner is busy at midnight. The learner who wants to see what a process, a thread and a gigabyte actually look like in motion. The common thread is one question — what is using what, right now — asked about a machine you may legitimately look at.
What it is not
btop is not a recording: it shows the present and the last minute or so of graph, and keeps nothing for later (chapter 10). It is not a multi-machine tool: it watches the machine it runs on. It is not a tuning tool: it can send a process a signal (chapter 5) and change a process's priority, but it does not fix why a program is hungry. And it is not all-seeing: run as yourself, it shows your processes in full and other users' in part; run as root it shows — and can stop — everything, which is power to use deliberately, not casually.