btop

On this page 7

btop is an interactive terminal resource monitor that displays CPU, memory, disk, network and process activity in a single full-screen dashboard with graphs, menus and mouse support. In Linux monitoring, it occupies the same niche as top and htop but emphasizes visual history and at-a-glance readability over minimal output.

The program is written in C++ and is also known as btop++. It is the successor of two earlier projects by the same developer, bashtop written in Bash and bpytop written in Python, and it replaced both with a faster, lower-overhead implementation.

How btop collects and renders system data

On Linux, btop reads kernel statistics mainly from procfs and sysfs, the virtual file systems under /proc and /sys. It samples counters such as CPU jiffies, memory fields from /proc/meminfo, per-process data from /proc/[pid]/stat and network byte counters, then computes rates from the difference between two samples.

Rendering happens entirely in the terminal. btop draws boxes, braille or block-character graphs and color gradients using ANSI escape sequences, and it redraws only after each sampling interval. The default update interval of 2,000 milliseconds balances smooth graphs against monitoring overhead.

The dashboard is divided into panels, summarized in the following table.

PanelMain metricsTypical question answered
CPU boxTotal and per-core load, frequency, temperature, load averageIs the processor saturated or overheating
Memory boxUsed, available, cached and free memory, swapIs the system short of memory
Disks boxUsage per mount point, read and write ratesIs a file system full or busy
Network boxUpload and download rates with historyIs traffic unusually high
Process boxPer-process CPU, memory, threads, user, commandWhich program causes the load
GPU boxUtilization, memory, temperature and power on supported GPUsIs the graphics card the bottleneck
Main btop panels and what they show

Interacting with processes in btop

btop is not only a viewer; it is a process management front end. Users can sort processes by any column, switch to a tree view that shows parent and child relationships, and filter the list by name or command line.

Selecting a process opens a detailed process view with its own CPU graph, memory usage and status. From there, btop can send any POSIX signal, such as SIGTERM for a clean shutdown or SIGKILL for an immediate stop, which makes it a practical replacement for typing kill commands by hand.

The table below lists frequently used keyboard actions.

KeyActionUse case
fFilter processesFind one service among hundreds
eToggle tree viewTrace which parent spawned a process
kSend SIGKILLStop a hung process immediately
tSend SIGTERMAsk a process to exit cleanly
mOpen the main menuChange options and themes
qQuitLeave the monitor
Common btop keyboard actions

Mouse support works in most modern terminal emulators, so clicking on processes and menu items is possible even over SSH sessions.

btop compared with top, htop and other monitors

The choice between monitoring tools depends on availability, depth and presentation. top is present on almost every Linux system, htop adds color and easy navigation, while btop adds historical graphs for every resource in one screen.

The comparison below shows how btop relates to its closest neighbors.

ToolStrengthLimitation
topInstalled almost everywhere, scriptable batch modePlain display, no history graphs
htopFast process navigation, tree view, low overheadLimited disk and network detail
btopGraphs for CPU, memory, disks, network and GPUHigher visual demands on the terminal
atopRecords history to files for later analysisDenser output, steeper learning curve
GlancesPlugins, web mode and export to databasesPython runtime with more overhead
iotopPrecise per-process disk I/OFocuses on a single resource
btop and related terminal monitors

A key distinction is that btop shows live state only. It does not store history on disk, so retrospective analysis needs tools such as sar or atop, or a full metrics stack.

Configuration and themes

btop stores its settings in a plain-text configuration file, usually ~/.config/btop/btop.conf, which is written automatically when options change in the menu. Administrators can therefore copy one configuration across many servers for a consistent view.

  • Themes control colors and gradients; many are bundled, and custom theme files can be added.
  • Presets store different panel layouts, for example a process-only view for small terminals.
  • Graph symbols can use braille, block or TTY characters to match terminal capabilities.
  • Temperature sensors and disk filters limit the display to relevant hardware.
  • A TTY mode reduces colors and symbols for consoles without Unicode support.

btop needs a terminal with UTF-8 and 256-color or truecolor support for full graphics. On older consoles, the low-color mode prevents unreadable output.

Limitations and common mistakes

btop is a diagnostic tool for humans, not a monitoring system. It does not alert, does not retain data and only shows the host it runs on, so it complements rather than replaces centralized monitoring.

Typical misreadings and their corrections are summarized below.

ObservationCommon mistakeCorrect reading
Memory looks almost fullAssuming a memory leakCache and buffers are reclaimable and normal
Process shows 300 percent CPUAssuming a display errorMulti-threaded load spans several cores
Some processes lack detailsBlaming btopRunning without root limits visibility of other users
Very short spikes missingAssuming no spikes occurredThe sampling interval averages brief bursts
Frequent btop misinterpretations

Inside containers, btop sees what the container exposes through procfs, which may reflect host-wide values rather than container limits. Container-aware tools give more reliable figures there.

In everyday language

A computer is always busy doing many small jobs at once. btop is like a dashboard in a car: it shows how hard the engine works, how full the tank is and how fast data travels in and out.

It runs inside a text window, yet it draws colorful moving graphs. If the computer suddenly slows down, btop shows which program is responsible and lets the user stop it with a few key presses.

Seen in the real world

A system administrator at an online retailer receives complaints that the product search on a Linux web server responds slowly. Logging in over SSH, the administrator starts btop and sees the CPU box at about 95 percent across all eight cores, while the network box shows normal traffic.

Sorting the process box by CPU reveals that a nightly reporting script started early by mistake and spawned twelve worker processes. The tree view confirms they all belong to one parent. The administrator sends SIGTERM to the parent with the t key, CPU load falls below 20 percent within seconds, and search response times return to normal. The script schedule is then corrected in the job scheduler.