atop
Monitor system resource usage per process
TLDR
Start
Start and display memory consumption for each process
Start and display disk information
Start and display background process information
Start and display thread-specific resource utilization information
Start and display the number of processes for each user
Display help about interactive commands
SYNOPSIS
atop [options] [interval [samples]]
PARAMETERS
-a
Show only active (CPU, disk, network) processes/threads.
-c
Show the full command line of processes.
-d
Show disk-related activity, including per-disk and per-process I/O.
-m
Show memory and swap space usage, including per-process memory details.
-n
Show network interface and TCP/UDP activity, including per-process network traffic.
-P category
Select specific resource categories to display (e.g., CPU, MEM, DSK, NET, PRC, ALL).
-r file
Read raw performance data from a previously recorded atop file (e.g., /var/log/atop/atop_YYYYMMDD).
-S
Show process and thread statistics in CSV (Comma Separated Values) format, suitable for scripting or data analysis.
-y
Show individual threads in the process list, providing a more granular view of resource consumption.
interval
The interval in seconds between samples (updates) of the displayed information.
samples
The number of samples to collect before exiting, useful for one-shot data collection.
DESCRIPTION
atop is an advanced interactive monitor for Linux systems that provides detailed insights into system resource utilization. Unlike traditional tools like top, atop offers a comprehensive view by reporting on CPU, memory, disk, network, and process activity at both a global and a per-process/per-thread level.
It highlights critical resources that are nearing saturation and can display resource consumption by individual threads within a process. A key feature is its ability to log raw performance data to a file, enabling post-mortem analysis of system behavior over time. This makes atop an invaluable tool for identifying performance bottlenecks, troubleshooting system issues, and understanding long-term trends in resource usage.
CAVEATS
For full functionality, especially detailed per-process disk and network statistics, atop often requires root privileges. Continuous logging of data can consume significant disk space over time, depending on the logging interval and system activity. Not all metrics may be available on all kernel versions or system configurations.
INTERACTIVE DISPLAY
While running, atop allows users to dynamically switch between different views of system activity by pressing various keys. For example, 'g' for generic, 'm' for memory, 'd' for disk, 'n' for network, 'u' for users, and 'p' for processes, allowing for quick focus on specific resource types.
LOGGING AND ANALYSIS WITH ATOPSAR
When configured, atop automatically logs system activity to files (typically in /var/log/atop/). The companion command, atopsar, can then be used to generate summary reports or extract specific statistics from these log files, similar to how sar processes sysstat data.
HISTORY
Developed by Gerlof van Rooijen (ATComputing), atop was created to address the limitations of existing system monitoring tools by offering more detailed, per-process/per-thread metrics and, crucially, robust logging capabilities. It gained popularity for its ability to go beyond real-time monitoring to provide historical analysis, making it a powerful diagnostic tool for complex performance issues.