LinuxCommandLibrary

atop

Monitor system resource usage per process

TLDR

Start

$ atop
copy

Start and display memory consumption for each process
$ atop -m
copy

Start and display disk information
$ atop -d
copy

Start and display background process information
$ atop -c
copy

Start and display thread-specific resource utilization information
$ atop -y
copy

Start and display the number of processes for each user
$ atop -au
copy

Display help about interactive commands
$ <?>
copy

SYNOPSIS

atop [-g|-m|-d|-n|-s|-u|-v|-p|-t|-r] [-C] [-D] [-M] [-P proclist] [-L linelen] [-a] [-b[=seconds]] [-c] [-d] [-f file] [-h] [-i seconds] [-k] [-l] [-o file] [-p pidlist] [-R] [-s] [-S] [-t] [-u] [-V] [-w file] [interval [samples]]

PARAMETERS

-a
    Show all system resources (default).

-b[=seconds]
    Run in batch mode (no interactivity); optional interval.

-c
    Show command line per process.

-d
    Show disk utilization details.

-f file
    Read data from file instead of /proc.

-g
    Group processes by generic name.

-h
    Show help.

-i seconds
    Sample interval (default 10s).

-k
    Calibrate for accurate CPU stats.

-l
    No log rotation on startup.

-m
    Show memory details.

-n
    Show network details.

-o file
    Output to file in raw format.

-p pidlist
    Show only specified processes.

-P proclist
    Aggregate processes by name.

-r
    Require root privileges explicitly.

-s
    Show cumulative stats since boot.

-S
    Sort processes system-wide.

-t
    Include threads in process view.

-u
    Show GPU utilization (NVIDIA).

-v
    Various info pages.

-w file
    Write raw log to file.

-C
    Continuous logging mode.

-D
    Disk wait details.

-L linelen
    Set line width.

-M
    Memory page scan details.

-R
    Show run queue.

-V
    Show version.

DESCRIPTION

atop is an interactive diagnostic tool for monitoring Linux system and process performance. It displays resource usage like CPU, memory, disk I/O, network, and paging in a top-like full-screen interface. Unlike top, it shows cumulative figures since boot or a defined interval, per-process details, and supports historical analysis from log files.

Key features include dynamic screen adaptation to hardware, process drill-down with open files and command lines, selective views (e.g., GPU, memory leaks), and raw log recording for later replay. It highlights deviant processes consuming disproportionate resources using colors and urgency indicators. atop runs efficiently with low overhead, making it suitable for production servers. Logs can be compressed and parsed for long-term trending.

Ideal for troubleshooting bottlenecks, capacity planning, and forensic analysis, it surpasses basic tools by integrating multiple metrics cohesively.

CAVEATS

Requires root for full data (e.g., disk I/O per process); high CPU on very busy systems; kernel support needed for some metrics like GPU.

VIEWING LOGS

Replay with atop -r file; navigate timestamps with 'b'/'t'; compress logs with gzip.

KEYBINDINGS

'm' memory view, 'd' disk, 'n' network, 'u' GPU, 't' own processes, '?' help.

URGENCY COLORS

Red/yellow highlight deviant processes; customizable thresholds.

HISTORY

Developed by Gerlof Langeveld; first release in 1999. Actively maintained, with version 2.11.0 in 2023 adding BPF support, GPU monitoring, and improved logging. Widely used in enterprise Linux for its low overhead and historical capabilities.

SEE ALSO

top(1), htop(1), sar(1), iotop(1), vmstat(1), iostat(1)

Copied to clipboard