Log inSign up

See what your server is doing right now with btop and htop

Install htop and btop from your distribution (EPEL on Rocky and Alma), then run htop to sort processes by CPU or memory and btop for a full screen view of CPU, memory, disks and network. Add iotop-c for disk heavy processes and glances for a single overview, and you can find most slowdowns within a minute of logging in.

Topic: Monitoring and logs · Tested on: Ubuntu 24.04 and 22.04, Debian 12 and 13, Rocky Linux 9, AlmaLinux 9 · Updated 2026-12-03

Which live monitor should I open first?

Start with htop when you want to act on processes, and with btop when you want the whole picture at a glance. Both read the same kernel counters as top; they differ in layout and comfort.

  • top: always installed, useful on a rescue shell or a minimal image.
  • htop: colour bars per core, tree view, mouse support, filtering and signal sending.
  • btop: graphs for CPU, memory, every disk and the network interface in one screen, plus a process list.
  • glances: a dense summary with warnings, including sensors, containers and file systems.
  • iotop-c: which process is reading or writing to disk, in bytes per second.

These tools show the present moment only. For history over days and weeks, combine them with the Usage graphs tab in the console and an agent such as Netdata.

How do I install them on Ubuntu, Debian, Rocky and Alma?

On Ubuntu and Debian every tool is in the standard archive (Ubuntu keeps btop and glances in universe, which is enabled on our images):

sudo apt update
sudo apt install -y htop btop glances iotop-c sysstat

On Rocky Linux 9 and AlmaLinux 9, enable EPEL for btop, htop and glances:

sudo dnf install -y epel-release
sudo dnf install -y htop btop glances iotop sysstat

Check what you got:

htop --version
btop --version
glances --version

Versions differ between releases (Ubuntu 22.04 carries an older btop than 24.04), which only matters for a few menu options. Run apt policy btop or dnf info btop to see the candidate version before you install.

How do I read the top of an htop screen?

The header answers three questions: how busy each core is, how much memory is truly in use, and how much work is waiting.

  • Core bars: green is user time, red is kernel time, and on a VPS a separate colour shows steal, time the hypervisor gave to other guests. Turn on detailed CPU time in the setup menu (F2, Display options) to see it.
  • Mem: green is used by programs; blue and yellow are buffers and cache, which Linux hands back when programs need it. A full bar of cache is healthy.
  • Swp: some swap use is normal. Steady swap growth with little free memory means the plan is too small or a process leaks.
  • Load average: the 1, 5 and 15 minute averages of runnable and waiting tasks. Compare with the number of vCPUs: a load of 2.0 on a 2 vCPU server means full, not overloaded.

Our plans use shared vCPU, so a few percent of steal from time to time is expected. If steal stays high for long periods, open a support ticket with a screenshot of the numbers.

Which htop keys find a problem process quickly?

A handful of keys cover almost everything:

  • F6 or >: choose the sort column (PERCENT_CPU, PERCENT_MEM, TIME).
  • F5 or t: tree view, so you see which parent spawned a swarm of workers.
  • F4 or \: filter by name, for example php-fpm.
  • u: show one user only, such as www-data or deploy.
  • H: hide user threads, which makes Java and Node apps readable.
  • F9 or k: send a signal. Try SIGTERM (15) before SIGKILL (9).
  • F2: setup, where you add columns like IO_READ_RATE and IO_WRITE_RATE.

Your layout is saved to ~/.config/htop/htoprc when you quit with F10, so you set it up once per user. Run sudo htop when you need to signal processes owned by other users.

What does btop add and how do I move around it?

btop draws rolling graphs for each resource, so trends over the last minutes are visible without any agent. Press 1, 2, 3 or 4 to toggle the CPU, memory, network and process boxes, Esc for the main menu and options, and f to filter the process list. Arrow keys left and right change the sort column, e toggles the tree view and k sends a kill signal to the selected process.

The disk panel is the part people miss: it lists each mounted filesystem with fill level and live read and write rates, so a log file that grows quickly is obvious. The network panel shows the current rate on the main interface and scales automatically.

Settings, including the theme and the update interval, live in ~/.config/btop/btop.conf. Over a slow SSH link, raise the interval to 2000 milliseconds to reduce screen redraws. If the boxes look garbled, your terminal lacks UTF-8 or 256 colours; run btop --utf-force or switch to a modern terminal emulator.

How do I find out which process hammers the disk?

High wa (I/O wait) in top or a busy disk graph in btop tells you the disk is the bottleneck. iotop names the culprit:

sudo iotop-c -o    # Ubuntu, Debian
sudo iotop -o      # Rocky, Alma

The -o flag hides idle processes. For a log you can paste into a ticket, the sysstat tools sample at fixed intervals:

iostat -xz 2 5
pidstat -d 2 5
vmstat 2 5

In iostat, watch %util and r_await or w_await; in vmstat, the si and so columns reveal swapping, a common reason for disk load on small plans. If swap is the cause, the guide on adding a swap file and the one on inspecting processes and memory help you decide between tuning and a larger plan.

When is glances the better choice?

Glances suits a quick health check because it highlights values in colour when they cross thresholds and shows file systems, network, sensors and the top processes on one screen. Run it plainly with glances, or with glances --disable-plugin sensors on a VPS where no sensors exist.

Glances also has a web mode (glances -w) that listens on port 61208. Bind it to loopback and tunnel to it rather than opening the port:

glances -w --bind 127.0.0.1
# on your computer
ssh -N -L 61208:127.0.0.1:61208 deploy@198.51.100.24

Then open http://127.0.0.1:61208 locally. If you want a page others can reach, place it behind HTTPS with a password using the Caddy tutorial.

How do I keep a quick record when a problem comes and goes?

Intermittent slowdowns are hard to catch live, so record a few samples automatically. The simplest method is batch mode of top, written to a file every minute by a timer or cron job:

top -b -n 1 -o %CPU | head -n 25 >> /var/tmp/top-samples.log

sysstat can also collect continuously. Enable its timer and read past data with sar:

sudo systemctl enable --now sysstat
sar -u -s 10:00:00 -e 11:00:00
sar -r

On Ubuntu and Debian, set ENABLED="true" in /etc/default/sysstat before enabling the service. The cron and timers guide shows how to schedule the top snapshot cleanly.

Plans that fit this guide

Base city prices. Every plan includes a dedicated IPv4 address, IPv6, full root and all 18 images.

All prices
PlanFits becauseSizeMonthlyOrder from
S1-2any plan, these tools are tiny1 vCPU, 2 GB RAM, 55 GB SSD$6.00/mo$72.00 for 12 months

Questions about btop, htop and other live monitors

Why does htop show almost no free memory?

Linux uses spare RAM as file cache and returns it instantly when programs ask. Look at the available figure from free -h; that is the memory new programs can really use.

What is steal time on a VPS?

It is CPU time your server wanted but the host gave to other guests. A small amount on shared vCPU plans is normal. Long periods of high steal are worth a support ticket with the numbers you saw.

Is btop heavier than htop?

A little, because it draws graphs. Both use a tiny share of one vCPU at the default refresh rate, and you can slow btop down in its options if needed.

Can I run these tools without sudo?

Yes for viewing. You need sudo to signal processes of other users and for iotop, which reads per process I/O counters.

Do these tools keep history?

No, apart from sar from sysstat. For graphs over days use the console Usage graphs plus Netdata or Prometheus.

How do I see live bandwidth per connection?

btop shows the interface total. For per host or per process traffic, use iftop and nethogs as described in live bandwidth with iftop and nethogs.