$linuxjunkies
>

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.

UbuntuDebianFedoraArch

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

FlagWhat it does
-dshow disk statistics and I/O details for each process
-nshow network statistics and socket information per process
-mshow memory details including page faults and swapping
-gshow generic process information including thread and file descriptor counts
-Psort by CPU usage (default sorting)
-Msort by memory usage instead of CPU
-Dsort by disk I/O activity
-cshow command line arguments for each process
-rshow memory as relative values (percentage of total)
-ssecure mode; hide sensitive details in command lines
-wwrite raw samples to a file for later analysis with atopsar
-bbatch mode; no interactive commands, suitable for logging

Examples

start atop with default settings, updating every 10 seconds; press 'q' to quit

atop

take 10 samples at 5-second intervals, then exit automatically

atop 5 10

log raw samples to a file for historical analysis and replay

atop -w /var/log/atop.log

show memory details view with 2-second refresh interval

atop -m 2

display disk I/O statistics for each process in real time

atop -d

replay 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 -M

collect 3 samples in batch mode and save output to file

atop -b 3 0 > /tmp/atop_snapshot.txt

Related commands