Install and Start atop
atop is not installed by default. On Debian and Ubuntu:
sudo apt install atop
On AlmaLinux and Rocky Linux, atop comes from the EPEL repository:
sudo dnf install epel-release
sudo dnf install atop
Start it with sudo atop. It refreshes every 10 seconds; to choose another interval, give it in seconds: sudo atop 2. Press q to quit. Run it with sudo so it can read every process.
Read the Screen
The top half describes the whole system, one resource per line. The bottom half lists processes, busiest first.
| Line | What it shows |
|---|---|
PRC | Process count and CPU time in system and user mode. |
CPU, cpu | Total CPU use, then each core. |
CPL | Load averages. |
MEM, SWP | Memory and swap. |
DSK | Busy percentage and reads and writes per disk. |
NET | Traffic per network layer and interface. |
atop colors a line when a resource is close to its limit, so a busy disk or full memory stands out. On a virtual server, a high steal value on the CPU line means the host gave the CPU to other work.
Keys for Each View
| Key | View |
|---|---|
g | General view (the default). |
m | Memory per process. |
d | Disk reads and writes per process. |
n | Network per process. |
c | Full command line of each process. |
u, p | Totals per user or per program. |
Upper-case letters change the sort order: C sorts by CPU, M by memory, D by disk, and A by the busiest resource. The network view per process needs the optional netatop or netatop-bpf module, installed separately; without it, the per-process network figures are not available.
Keep History in /var/log/atop
The package includes a service that writes a snapshot of the system to a log file at a fixed interval, every 600 seconds (ten minutes) with the upstream default settings. Make sure it runs, together with the timer that starts a new file each day:
sudo systemctl enable --now atop
sudo systemctl enable --now atop-rotate.timer
ls /var/log/atop/
There is one file per day, named like atop_20261128, and the upstream default keeps 28 days. The interval and the number of days to keep are set in /etc/default/atop on Debian and Ubuntu and in /etc/sysconfig/atop on AlmaLinux and Rocky Linux. The files are compact, but check them with df and du on a small disk.
Replay a Past Slowdown
sudo atop -r /var/log/atop/atop_20261128 -b 0300
-r reads a log file and -b starts at a given time, written as hhmm (here 03:00). In replay mode, press t for the next snapshot and T for the previous one; all view keys work as in live mode. sudo atop -r with no file opens today's log.
A typical search: open the log at the time of the complaint, check which line is colored, switch to the matching view (m for memory, d for disk), and read the name of the process at the top.
Summary Reports with atopsar
atopsar prints the same log as a table, one row per interval, which is easier to scan for a whole day:
sudo atopsar -c -r /var/log/atop/atop_20261128
sudo atopsar -m -r /var/log/atop/atop_20261128
sudo atopsar -d -r /var/log/atop/atop_20261128
The flags select CPU, memory, and disk.
atop, top, or htop?
- top: installed everywhere; shows CPU and memory per process right now.
- htop: a friendlier top with colors, scrolling, and a process tree.
- atop: adds disk and network per process and keeps history; the tool to use after the problem is over.
For quick checks, see how to list running processes in Linux. When atop points at one service, systemctl shows its state and its logs.