atop(1)
atop is a system monitor for Linux that displays real-time per-process and system-wide resource usage including CPU, memory, disk I/O, and network activity.
Synopsis
atop [options] [interval [samples]]Description
atop is an advanced system performance monitoring tool that provides detailed visibility into process-level and system-level resource consumption. Unlike top, atop captures historical data and can log performance metrics to disk for later analysis, making it useful for troubleshooting performance issues and understanding system behavior over time.
The command displays active processes sorted by resource usage, with color highlighting to indicate resource stress. It tracks CPU, memory, disk I/O, network traffic, and thread counts in real time, updating at configurable intervals.
Common options
| Flag | What it does |
|---|---|
-d | show disk statistics and I/O details for each process |
-n | show network statistics and socket information per process |
-m | show memory details including page faults and swapping |
-g | show generic process information including thread and file descriptor counts |
-P | sort by CPU usage (default sorting) |
-M | sort by memory usage instead of CPU |
-D | sort by disk I/O activity |
-c | show command line arguments for each process |
-r | show memory as relative values (percentage of total) |
-s | secure mode; hide sensitive details in command lines |
-w | write raw samples to a file for later analysis with atopsar |
-b | batch mode; no interactive commands, suitable for logging |
Examples
start atop with default settings, updating every 10 seconds; press 'q' to quit
atoptake 10 samples at 5-second intervals, then exit automatically
atop 5 10log raw samples to a file for historical analysis and replay
atop -w /var/log/atop.logshow memory details view with 2-second refresh interval
atop -m 2display disk I/O statistics for each process in real time
atop -dreplay system statistics from a logged atop file around noon
atopsar -r /var/log/atop.log | grep -A 5 '12:00'show command lines and sort processes by memory consumption
atop -c -Mcollect 3 samples in batch mode and save output to file
atop -b 3 0 > /tmp/atop_snapshot.txt