ATOP(1)
๐ ATOP(1) ๐ โ the manual for atop, bestie
okay so like, welcome to the atop man page, from the General Commands Manual section ๐ this is the whole vibe, no cap.
โจ NAME โจ
atop โ Advanced System & Process Monitor ๐ซถ
๐ธ SYNOPSIS ๐ธ
okay so there's like nine different ways to summon this thing. pick your fighter ๐
Live measurement in bar graph mode:
atop -B[H] [-t [absdir]] [interval [samples]]
Live measurement cgroups in text mode:
atop -G [-t [absdir]] [-2|-3|-4|-5|-6|-7|-8|-9] [-a] [-C|-M|-D|-A] [interval [samples]]
Live measurement processes in text mode:
atop [-t [absdir]] [-g|-m|-d|-n|-u|-p|-s|-c|-v|-o|-y|-Y] [-C|-M|-D|-N|-A] [-fFX1xR] [interval [samples]]
Live generation of parsable output (white-space separated or JSON):
atop [-Plabel[,label]... [-Z]] [-Jlabel[,label]...] [interval [samples]]
Write raw log files:
atop -w rawfile [-a] [-S] [interval [samples]]
Analyze raw log files in bar graph mode:
atop -B[H] -r [rawfile|yyy...] [-b [YYYYMMDD]hhmm[ss]] [-e [YYYYMMDD]hhmm[ss]]
Analyze cgroups from raw log files in text mode:
atop -G [-2|-3|-4|-5|-6|-7|-8|-9] [-a] -r [rawfile|yyy...] [-b [YYYYMMDD]hhmm[ss]] [-e [YYYYMMDD]hhmm[ss]]
Analyze processes from raw log files in text mode:
atop -r [rawfile|yyy...] [-b [YYYYMMDD]hhmm[ss]] [-e [YYYYMMDD]hhmm[ss]] [-g|-m|-d|-n|-u|-p|-s|-c|-v|-o|-y|-Y] [-C|-M|-D|-N|-A] [-fFX1xR]
Generate parsable output from raw log files (white-space separated or JSON):
atop -r [rawfile|yyy...] [-b [YYYYMMDD]hhmm[ss]] [-e [YYYYMMDD]hhmm[ss]] [-Plabel[,label]... [-Z]] [-Jlabel[,label]...]
๐ฆ DESCRIPTION ๐ฆ
so atop is this interactive monitor that lets you peek at the load on a Linux system ๐ every interval seconds โ and bestie, the default is 10 seconds โ it goes and gathers info about the resource occupation at the system level (that's CPUs, memory, disks and network interfaces) and at the cgroup level (version 2, iykyk).
and that's not even all of it โ it also gathers info about the processes and threads that are the ones actually responsible for using up the CPUs, memory and disks ๐ฅ
ok important caveat bestie: network load per process only shows up when thenetatopkernel module or thenetatop-bpfBPF module has been installed. no module, no per-process network tea ๐
๐ง TWIN MODE ๐ง
with the -t flag you can run atop interactively in what's called 'twin mode' โจ and honestly? iconic. this mode lets you run a live measurement and have the possibility to review and analyze an earlier sample at the same time. meanwhile, the live measurement just keeps going. main character energy fr fr ๐
when it's started in twin mode, atop spawns a child process that gathers the counters and writes them to a temporary raw file ๐ the parent process reads the counters from that temporary raw file and presents them to you, the user. and the reading of the parent process keeps in pace with the written samples of the child process for live measurements โ they're literally in sync, we love a coordinated duo ๐ซถ
while the gathering continues by the child process, you can press key r, key b or key T to review earlier samples. the parent process implicitly pauses the live measurement when you press one of these keys โ or when you press key z (pause) explicitly, if you wanna be direct about it ๐
and after you've been browsing through the earlier samples with the keys t (next sample), T (previous sample), r (reset to begin of measurement), Z (fast-forward to end of measurement) and b (branch to timestamp), you can continue the live measurement by pressing key z (resume after pause) ๐ and we're back, periodt.
the temporary raw file gets written in the /tmp directory by default. optionally you can add the absolute path name of an alternative directory behind the -t flag (like, e.g. when there's not enough space in the /tmp directory, been there ๐ญ). in any case, the parent process will terminate the child process when the measurement is finished and the temporary raw file will be removed ๐ clean up after yourself, we stan.
๐ BAR GRAPH MODE ๐
Okay bestie, so when you're running atop you've got two whole vibes to pick from: bar graph mode or text mode. In bar graph mode, the resource utilization of CPUs, memory, disks and network interfaces is shown via (character-based) bar graphs โ but lowkey only on system level. When you want more detailed info on system level, or when you're feeling nosy and want the resource consumption on process or thread level, you switch to text mode by pressing the B key. And alternatively, you can use the B key (again) to switch from text mode to bar graph mode. Toggle queen ๐
โจ
By default, atop starts in text mode unless the -B flag is used or unless B has been configured as a default flag in the .atoprc file (for further info about default flags, go read the atoprc man page, iykyk).
In bar graph mode the terminal gets subdivided into four character-based windows, i.e. one window for each hardware resource:
๐ป Processors ๐ป
- The first bar shows the average busy percentage of all CPUs with the bar label
Avg(might be abbreviated toAvor even justAโ she's shrinking under pressure ๐ซถ). The subsequent bars show the busy percentages of single CPUs. - When there's not enough horizontal space to show all CPUs, only the most busy CPUs per sample will be shown, after the width of each bar has been reduced to a minimum.
- By default, the categories of CPU consumption are shown by different colors in the bars, marked with a character
S(system mode),U(user mode),I(interrupt handling),s(steal) andG(guest, i.e. consumed by virtual machines). - The top of the bar might consist of an unmarked color representing a
neutralcategory. Suppose that the scale unit is 5% per line and the total busy percentage is 54% consisting of two categories of 27%. The two categories will be rounded to 25% (5 lines of 5% each) but the total busy percentage will be rounded to 55% (11 lines of 5%). Then the top line will represent aneutralcategory. Math is mathing โจ - By pressing the H key or by starting
atopwith the-Hflag, no categories are shown. - A red line is drawn in the bar graph as critical threshold ๐จ. By default this value is 90% and can be modified by the
cpucritpercoption in the configuration file (see separateatoprcman page). When this value is set to zero, no threshold line will be drawn.
๐ง Memory and swap space ๐ง
- Memory is presented as a column in which the specific categories of memory consumption are shown. These categories are (code, data and stack of) processes/kernel, slab caches (i.e. dynamically allocated kernel memory), shared memory,
tmpfs, static huge pages, page cache and free memory. - At the left side of the memory column, a vertical green line shows the memory which is available (i.e. reclaimable) for allocations per category without causing swapping or heavy reclaim. This is a categorized breakdown of the available memory value that is shown as
availin theMEMline of the text mode. - Swap space (if present) is presented as another column in which the categories
processes/tmpfs, shared memory and free space are shown. - At the right side, memory-related event counters are shown. The bottom three counters are colored green when there's no memory pressure. When considerable activity is noticed such counter might be colored orange, and with high activity, red ๐.
- When memory pressure starts, usually memory page scanning will be activated first. When pressure increases, memory pages of processes might be swapped out to swap space (if present).
- The
oomkillscounter (Out Of Memory killing) is the most serious one ๐: it reflects the number of processes that are killed due to lack of memory (and swap). Therefore this counter shows the absolute number (not per second) of processes being killed during the last interval and will immediately be colored red when it is 1 or more. Besides, afteratophas noticed OOM killing, theoomkillscounter remains orange for the next 15 minutes, just in case you missed the OOM killing event itself. She's not letting you forget, bestie ๐ญ - When there's enough vertical space in the memory window, event counters are shown about the number of memory pages being swapped in, the number of memory pages paged out to block devices and the number of memory pages paged in from block devices.
- Memory and swap space consumption will preferably be shown in a character-based window that vertically uses the entire screen for optimal granularity. However, when there are a lot of disks and/or network interfaces, the memory and swap space consumption will be shown in a character-based window that only uses the upper half of the screen.
๐พ Disks ๐พ
- For each disk, the busy percentage is shown as a bar. When there's not enough horizontal space to show all disks, only the most busy disks per sample will be shown.
- By default, categories of disk consumption are shown by different colors in the bars, marked with a character
R(read) andW(write). - The top of the bar might consist of an unmarked color representing a
neutralcategory. Suppose that the scale unit is 5% per line and the total busy percentage is 54% consisting of two categories of 27%. The two categories will be rounded to 25% (5 lines of 5% each) but the total busy percentage will be rounded to 55% (11 lines of 5%). Then the top line will represent aneutralcategory. (Yes, same rounding situation as the CPUs โ she's consistent ๐ ) - By pressing the H key or by starting
atopwith the-Hflag, no categories are shown. - A red line is drawn in the bar graph as critical threshold ๐จ. By default this value is 90% and can be modified by the
dskcritpercoption in the configuration file (see separateatoprcman page). When this value is set to zero, no threshold line will be drawn.
๐ก Interfaces ๐ก
- For each non-virtual network interface a double bar graph is shown with a dedicated scale that reflects the traffic rate. One of the bars shows the transmit rate (
TX) and the other bar the receive rate (RX). The traffic scale of each network interface remains at its highest level. All interface scales can be reset during the measurement by pressing the L key ๐ฅ. - Most often the real speed (maximum bandwidth) of network interfaces is not known, e.g. in case of the network interfaces of virtual machines. Therefore it's not possible to show the interface utilization as a percentage. However, when the real speed of an interface is known, it will be shown underneath the concerning bar graph.
- When there's not enough horizontal space to show all network interfaces, only the most busy interfaces per sample will be shown.
Usually the bar graphs will not be sorted on busy percentage when there's enough horizontal space. However, after switching from text mode to bar graph mode the bar graphs might have been sorted, because this was needed for the presentation in text mode. The next interval in bar graph mode shows the bars unsorted again โ unless the window width is unsufficient for all bars. Girlypop can only shrink so much ๐ซ
For the CPUs, disks and memory resources, also a bar graph with two bars is shown, reflecting the PSI values some (S) and full (F). The some (S) percentage indicates the time in which at least some tasks were stalled on a given resource. The full (F) percentage indicates the time in which all non-idle tasks were stalled on this resource simultaneously, which had severe impact on the performance ๐ฌ.
Heads up ๐ โ for some Linux distributions PSI support might be disabled by default. In that case you need to pass psi=1 on the kernel command line during boot.
The remaining part of this manual page mainly describes the information shown in text mode. When certain descriptions also apply to bar graph mode, it will be mentioned explicitly. Noted, bestie ๐โจ
โจ TEXT MODE IN GENERAL โจ
okay so bestie, every single interval, atop shows you the tea about resource occupation on the system level โ CPU, memory, disks and network layers โ up in the upper part of the screen. if a resource was literally unused during that interval, its line gets suppressed unless the f key is active. no wasted screen space, we love that.
in the bottom part of the screen you get cgroup level info (that's the G key) or process level info (the g, c, s, m, d, n, v, u or p keys). by default, only cgroups are shown without assigned processes in the cgroup itself nor in the cgroups underneath, unless the a key (all) is active. and by default, only processes that were active during the interval are shown, unless the a key (all) is active. the intervals keep repeating till the number of samples (specified as a command argument) is reached, or till the q key is pressed in interactive mode. periodt.
when atop starts, it checks whether the standard output channel is connected to a screen, or to a file/pipe. in the first case it produces screen control codes (via the ncurses library) and behaves interactively. in the second case it produces flat text output. very demure, very mindful.
in interactive mode, the output of atop scales dynamically to the current dimensions of the screen/window. if the window is resized horizontally, columns get added or removed automatically. for this purpose, every column has a particular weight โ the columns with the highest weights that fit within the current width will be shown. if the window is resized vertically, lines of the process/thread list get added or removed automatically. it's giving responsive design before responsive design was a thing.
in interactive mode the output of atop can be controlled by pressing particular keys. however, it's also possible to specify such a key as a flag on the command line. in that case atop switches to the indicated mode on beforehand. this mode can be modified again interactively. specifying such a key as a flag is especially useful when running atop with output to a pipe or file (non-interactively). these flags are the same as the keys that can be pressed in interactive mode (see section INTERACTIVE COMMANDS). additional flags are available to support storage of atop-data in raw format (see section RAW DATA STORAGE).
by default, atop produces its output full-screen unless a flag is passed to direct the output to a raw log (-w) or direct the output in parseable (-P) or JSON output (-J). it is possible however to produce full-screen output while the output is also directed in another way. in that case a flag that relates to full-screen output (like -g) has to be passed on the command line explicitly. iykyk.
the status line in the initial screen shows if atop runs with restricted view (as unprivileged user) or unrestricted view (as privileged user). in case of restricted view, atop does not have the privileges (no root identity nor the necessary capabilities) to retrieve all counter values on system level and on process level. so yeah, no root no full tea. ๐
๐งพ PROCESS ACCOUNTING ๐งพ
with every interval, atop reads the kernel administration to obtain information about all running processes. however, it is likely that processes have terminated during the interval. these processes might have consumed system resources during this interval before they terminated. therefore, atop tries to read the process accounting records that contain the accounting information of terminated processes and report these processes too. only when the process accounting mechanism in the kernel is activated, the kernel writes such a process accounting record to a file for every process that terminates. okay so far? good.
there are various ways for atop to get access to the process accounting records (tried in this order):
- when the environment variable
ATOPACCTis set, it specifies the name of the process accounting file. in that case, process accounting for this file should have been activated on beforehand. before opening this file for reading, atop drops its root privileges (if any). when this environment variable is present but its contents is empty, process accounting will not be used at all. - this is the preferred way of handling process accounting records! when the
atopacctddaemon is active, it has activated the process accounting mechanism in the kernel and transfers the original accounting records to shadow files. in that case, atop drops its root privileges and opens the current shadow file for reading. this way is preferred because theatopacctddaemon maintains full control of the size of the original process accounting file written by the kernel and the shadow files read by the atop process(es).
the atopacct service will be activated before the atop service to enable atop to detect that process accounting is managed by the atopacctd daemon. as a forking service, atopacctd takes care that all directories and files are initialized before the parent process dies. the child process continues as the daemon process.
for further information, refer to the atopacctd man page.
- when the
atopacctddaemon is not active, atop verifies if the process accounting mechanism has been switched on via the separatepsacctoracctpackage (the package name depends on the Linux distro). in that case, one of the files/var/log/pacct,/var/account/pacctor/var/log/account/pacctis in use as process accounting file and atop opens this file for reading. - as a last possibility, atop itself tries to activate the process accounting mechanism (requires root privileges) using the file
/var/cache/atop.d/atop.acct(to be written by the kernel, to be read by atop itself). process accounting remains active as long as at least one atop process is alive. whenever the last atop process stops (either by pressingqor bykill -15), it deactivates the process accounting mechanism again.
๐จ bestie, never terminate atop by kill -9, because then it has no chance to stop process accounting. as a result, the accounting file may consume a lot of disk space after a while.
to avoid that the process accounting file consumes too much disk space, atop verifies at the end of every sample if the size of the process accounting file exceeds 200 MiB and if this atop process is the only one that is currently using the file. in that case the file is truncated to a size of zero.
notice that root-privileges are required to switch on/off process accounting in the kernel. you can start atop as a root user or specify setuid-root privileges to the executable file. in the latter case, atop switches on process accounting and drops the root-privileges again.
if atop does not run with root-privileges, it does not show information about finished processes. it indicates this situation with the message no procacct in the top-right corner (instead of the counter that shows the number of exited processes).
when during one interval a lot of processes have finished, atop might grow tremendously in memory when reading all process accounting records at the end of the interval. to avoid such excessive growth atop will never read more than 50 MiB with process information from the process accounting file per interval (approx. 54000 finished processes). in interactive mode a warning is given whenever processes have been skipped for this reason. we love a memory-safe queen. ๐ซถ
๐ COLORS ๐
for the resource consumption on system level, atop uses colors in text mode to indicate that a critical occupation percentage has been (almost) reached. a critical occupation percentage means that it is likely that this load causes a noticeable negative performance influence for applications using this resource. the critical percentage depends on the type of resource: e.g. the performance influence of a disk with a busy percentage of 80% might be more noticeable for applications/users than a CPU with a busy percentage of 90%. it's giving "not all resources are built the same."
currently atop uses the following default values to calculate a weighted percentage per resource:
- Processor โ a busy percentage of
90%or higher is considered 'critical' (also in bar graph mode). - Disk โ a busy percentage of
90%or higher is considered 'critical'. - Network โ a busy percentage of
90%or higher for the load of an interface is considered 'critical'. - Memory โ an occupation percentage of
90%is considered 'critical'. notice that this occupation percentage is the accumulated memory consumption of the kernel (including slab) and all processes. the memory for the page cache (cacheandbuffin the MEM-line) and the reclaimable part of the slab (slrec) is not implied! if the number of pages swapped out (swoutin the PAG-line) is larger than10per second, the memory resource is considered 'critical'. a value of at least1per second is considered 'almost critical'. if the committed virtual memory exceeds the limit (vmcomandvmlimin the SWP-line), the SWP-line is colored due to overcommitting the system. - Swap โ an occupation percentage of
80%is considered 'critical' because swap space might be completely exhausted in the near future. it is not critical from a performance point-of-view.
these default values can be modified in the configuration file (see separate atoprc man page).
when a resource exceeds its critical occupation percentage, the concerning values in the screen line are colored red by default. when a resource exceeds (by default) 80% of its critical percentage (so it is almost critical), the concerning values in the screen line are colored cyan by default. this 'almost critical percentage' (one value for all resources) can be also modified in the configuration file (see separate atoprc man page). the default colors red and cyan can be modified in the configuration file as well (see separate atoprc man page). customizable color coding? obsessed. ๐
with the key x (or flag -x), the use of colors can be suppressed in text mode. the use of colors is however mandatory in case of bar graph mode. so if you're in bar graph mode, the rainbow stays. ๐
๐ฆ NETATOP OR NETATOP-BPF MODULE ๐ฆ
okay so you want the network tea per-process AND per-thread? bestie, that's literally what the netatop kernel module or the netatop-bpf BPF module is for, and yes they can be installed separately. ๐
When atop has been started with the '-K' flag, it verifies if the netatop or netatop-bpf module is currently active. If so, atop obtains the relevant network counters from this module for each interval and shows the number of sent and received packets per process/thread in the generic screen. Besides, detailed counters can be requested by pressing the 'n' key.
When the netatopd daemon is running in combination with the netatop module, atop also reads the network counters of exited processes that are logged by this daemon (comparable with process accounting). so it's giving process-accounting-but-for-network, iconic honestly.
More information about the optional netatop kernel module and the netatopd daemon can be found in the concerning man-pages and on the website mentioned at the end of this manual page. ๐ซถ
๐ฅ GPU STATISTICS GATHERING ๐ฅ
GPU statistics can be gathered by atopgpud which is a separate data collection daemon process. It gathers cumulative utilization counters of every Nvidia GPU in the system, as well as utilization counters of every process that uses a NVIDIA GPU. When atop has been started with the '-k' flag, it reads these GPU utilization counters with every interval when the daemon is active. ๐
The atopgpud daemon is written in Python, so a Python interpreter should be installed on the target system. For the gathering of the statistics, the pynvml module is used by the daemon. Be sure that this module is installed on the target system before activating the daemon, by running the command pip as root user:
pip install nvidia-ml-py
The atopgpud daemon is installed by default as part of the atop package, but it is not automatically enabled. The daemon can be enabled and started now by running the following commands (as root):
systemctl enable atopgpu
systemctl start atopgpu
Find a description about the utilization counters in the section OUTPUT DESCRIPTION. ๐
โญ INTERACTIVE COMMANDS โญ
When running atop interactively (no output redirection), keys can be pressed to control the output. Certain keys can be used to show other information (other columns) for the active processes. Some of these keys can also be used to switch directly from bar graph mode to particular detailed process information in text mode. Other keys can be used to influence the sort order of the active process/thread list (keys 'C', 'M', 'D', 'N', 'E' or 'O'). yes bestie, you're the main character and the keyboard is your wand. โจ
gโ Show generic output (default).
Per process the following fields are shown in case of a window-width of 80 positions: process-id, CPU consumption during the last interval in system and user mode, the virtual and resident memory growth of the process. The data transfer per process for read/write on disk can only be shown when atop runs with root privileges. When the optional module netatop or netatop-bpf is loaded, the data transfer for send/receive of network packets is shown for each process. The last columns contain the state, the occupation percentage for the chosen resource (default: CPU) and the process name.
When more than 80 positions are available, other information is added. ๐ฆ
mโ Show memory related output.
Per process the following fields are shown in case of a window width of 80 positions: process-id, minor and major memory faults, size of virtual shared text, total virtual process size, total resident process size, virtual and resident growth during last interval, memory occupation percentage and process name.
When more than 80 positions are available, other information is added.
For memory consumption, always all processes are shown (also the processes that were not active during the interval). no skipping bestie, everybody's invited to this party ๐
dโ Show disk-related output.
When atop runs with root privileges, the following fields are shown: process-id, amount of data read from disk, amount of data written to disk, amount of data that was written but has been withdrawn again (WCANCL), disk occupation percentage and process name.
nโ Show network related output.
Per process the following fields are shown in case of a window width of 80 positions: process-id, thread-id, total bandwidth for received packets, total bandwidth for sent packets, number of received TCP packets with the average size per packet (in bytes), number of sent TCP packets with the average size per packet (in bytes), number of received UDP packets with the average size per packet (in bytes), number of sent UDP packets with the average size per packet (in bytes), the network occupation percentage and process name. This information can only be shown when the optional module netatop or netatop-bpf is installed. lowkey a whole paragraph of numbers but it's giving detail, okurr ๐
When more than 80 positions are available, other information is added.
sโ Show scheduling characteristics.
Per process the following fields are shown in case of a window width of 80 positions: process-id, number of threads in state 'running' (R), number of threads in state 'interruptible sleeping' (S), number of threads in state 'uninterruptible sleeping' (D), number of threads in state 'idle' (I), scheduling policy (normal timesharing, realtime round-robin, realtime fifo), nice value, priority, realtime priority, current processor, status, exit code, state, the occupation percentage for the chosen resource and the process name.
When more than 80 positions are available, other information is added.
vโ Show various process characteristics.
Per process the following fields are shown in case of a window width of 80 positions: process-id, user name and group, start date and time, status (e.g. exit code if the process has finished), state, the occupation percentage for the chosen resource and the process name. ๐
When more than 80 positions are available, other information is added.
cโ Show the command line of the process.
Per process the following fields are shown: process-id, the occupation percentage for the chosen resource and the command line including arguments. the way this shows you exactly what gremlin program is eating your CPU >>>
Gโ Show cgroup v2 information.
Show a hierarchical structure of cgroups and related metrics. Optionally, the processes assigned to each cgroup can be shown. With the keys/flags '2' till '7' the level depth of the cgroups can be chosen ('7' is default). With key/flag '8' the assigned active processes are shown as well, except the kernel processes (usually in the root cgroup). With key/flag '9' all active processes are shown, including the kernel processes.
With key/flag 'a' (toggle) all cgroups and all processes are shown instead of only the active cgroups and processes. A cgroup is considered inactive when no processes are assigned to that cgroup nor to the cgroups underneath.
With key/flag 'C' the output is sorted on CPU consumption, with key/flag 'M' sorted on memory consumption and with key/flag 'D' sorted on disk consumption. ๐
eโ Show GPU utilization.
Per process at least the following fields are shown: process-id, range of GPU numbers on which the process currently runs, GPU busy percentage on all GPUs, memory busy percentage (i.e. read and write accesses on memory) on all GPUs, memory occupation at the moment of the sample, average memory occupation during the sample, and GPU percentage. โก
oโ Show the user-defined line in the process list.
In the configuration file the keyword ownprocline can be specified with the description of a user-defined output-line. Refer to the man-page of atoprc for a detailed description. build your own line, be the architect of your own destiny fr fr ๐
yโ Show the individual threads within a process (toggle).
Single-threaded processes are still shown as one line. For multi-threaded processes, one line represents the process while additional lines show the activity per individual thread (in a different color). Depending on the option 'a' (all or active toggle), all threads are shown or only the threads that were active during the last interval. Depending on the option 'Y' (sort threads), the threads per process will be sorted on the chosen sort criterium or not. Whether this key is active or not can be seen in the header line. ๐
Yโ Sort the threads per process when combined with option'y'(toggle).uโ Show the process activity accumulated per user.
Per user the following fields are shown: number of processes active or terminated during last interval (or in total if combined with command 'a'), accumulated CPU consumption during last interval in system and user mode, the current virtual and resident memory space consumed by active processes (or all processes of the user if combined with command 'a'). When atop runs with root privileges, the accumulated read and write throughput on disk is shown. When the optional module netatop or netatop-bpf has been installed, the accumulated number of received and sent network packets is shown. The last columns contain the accumulated occupation percentage for the chosen resource (default: CPU) and the user name. ๐ซถ
pโ Show the process activity accumulated per program (i.e. process name).
Per program the following fields are shown: number of processes active or terminated during last interval (or in total if combined with command 'a'), accumulated CPU consumption during last interval in system and user mode, the current virtual and resident memory space consumed by active processes (or all processes of the user if combined with command 'a'). When atop runs with root privileges, the accumulated read and write throughput on disk is shown. When the optional module netatop or netatop-bpf has been installed, the accumulated number of received and sent network packets is shown. The last columns contain the accumulated occupation percentage for the chosen resource (default: CPU) and the program name.
jโ Show the process activity accumulated per container/pod. ๐ณ
Okay so per container (think Docker/Podman) or per pod (think Kubernetes), here's the lil field lineup you get ๐ซถ:
- the number of processes that were active or terminated during the last interval (or in total if you've combined it with the
acommand, iykyk) - accumulated CPU consumption during the last interval, split into system and user mode
- the current virtual and resident memory space eaten up by active processes (or all processes of the user if combined with
a)
When atop runs with root privileges, the accumulated read and write throughput on disk gets shown too. And when the optional netatop or netatop-bpf module is installed, you also get the accumulated number of received and sent network packets. โจ
The last columns are literally the accumulated occupation percentage for whichever resource you chose (default is CPU) plus the container/pod name (CID/POD). Slay.
Oโ define the sorting order of the process list based on a specific column (case insensitive, bestie, don't worry) and set whether sorting goes ascending or descending (descending is the most logical choice and it's the default). Heads up: the column you pick has to be part of the current process view โ either visible or unvisible (when the screen is too narrow to show the column, yeah that happens ๐ญ).
And for the shortcut girlies: selecting column CPU in descending order is equivalent to pressing C, column MEM in descending order is equivalent to pressing M, column DSK in descending order is equivalent to pressing D, column NET in descending order is equivalent to pressing N, and selecting column GPU in descending order is equivalent to pressing E. Chemistry. ๐
Cโ sort the current list by CPU consumption (this is the default, she's the main character). The one-but-last column changes toCPU.Eโ sort the current list by GPU utilization. The one-but-last column changes toGPU.Mโ sort the current list by resident memory consumption. The one-but-last column changes toMEM. Lowkey important: when you're sorting on memory, the full process list gets shown, not just the active processes.Dโ sort the current list by disk accesses issued. The one-but-last column changes toDSK.Nโ sort the current list by network bandwidth (received and transmitted, both of 'em). The one-but-last column changes toNET.
๐ Miscellaneous interactive commands ๐
?โ request help information (you can also pressh, same vibe).Vโ request version information (that's the version number and date).Rโ gather and calculate the proportional set size of processes (toggle). Warning bestie: gathering all the values needed to calculate thePSIZEof a process is a very time-consuming task, so only have this active when you're actually analyzing the resident memory consumption of processes. Don't just leave it on for the aesthetic, it's not worth it ๐ญWโ get theWCHANper thread (toggle). Same deal โ gathering theWCHANstring per thread is a relatively time-consuming task, so only turn this on when you're analyzing why threads are in sleep state. Investigative queen behavior only.xโ suppress colors that highlight critical resources (toggle). Whether this key is active or not can be seen in the header line, so peek up there ๐zโ the pause key, use it to freeze the current situation so you can actually investigate the output on your screen. Whileatopis paused, you can press all the keys described above to show other info about the current list of processes ๐ง Whenever you press the pause key again,atopcontinues with a next sample. Works in text mode and bar graph mode.iโ modify the interval timer (default:10seconds). If you enter an interval timer of0, the timer switches off entirely. In that case a new sample can only be triggered manually by pressingt. The interval can be modified in text mode and bar graph mode.tโ trigger a new sample manually. Press it when the current sample should finish before the timer has exceeded, or when no timer is set at all (interval timer defined as0). In that no-timer case,atopcan be used as a stopwatch to measure the load caused by a particular application transaction โ without knowing beforehand how many seconds that transaction will last. Iconic, honestly. Works in text mode and bar graph mode.
When viewing the contents of a raw file, this key shows the next sample from the file. It also works when viewing raw data via a pipe.
Tโ when viewing the contents of a raw file, this key shows the previous sample from the file โ but not when reading raw data from a pipe. Works in text mode and bar graph mode.bโ when viewing the contents of a raw file, branch to a certain timestamp within the file, either forward or backward. When viewing raw data from a pipe, only forward branches are possible. Works in text mode and bar graph mode.rโ reset all counters to zero so you can see the system and process activity since boot again. Works in text mode and bar graph mode.
When viewing the contents of a raw file, this key rewinds to the beginning of the file again (except when reading raw data from a pipe).
Zโ when viewing the contents of a raw file, fast-forward to the end of the file โ however not when reading raw data from a pipe. Works in text mode and bar graph mode.Uโ specify a regular expression string for specific user names, or a numerical UID. From then on, only (active) processes from a user matching that regex or numerical UID get shown. The system statistics are still system wide, no cap. If you press Enter without specifying a name, (active) processes of all users show up again. Whether this key is active or not can be seen in the header line.Iโ specify a list with one or morePIDs to be selected. From then on, only processes with aPIDmatching one of the given list get shown. System statistics stay system wide. If you press Enter without specifying aPID, all (active) processes show up again. Header line tells you if it's active.Pโ specify a search string for specific process names as a regular expression. From then on, only processes with a name matching the regex get shown. System stats still system wide. Enter with no name โ all (active) processes back. Check the header line for active status./โ specify a specific command line search string as a regular expression. From then on, only processes with a command line matching the regex get shown. System stats still system wide. Enter with no string โ all (active) processes again. Header line shows if it's active.Jโ specify a container id (e.g. Docker or Podman) or pod name (e.g. Kubernetes) of maximum15characters. If the name is longer, the last15characters are what's expected. From then on, only processes running in that specific container or pod get shown. System stats still system wide. Enter with nothing โ all (active) processes again. Header line = active status check ๐Qโ specify a comma-separated list of process/thread state characters. From then on, only processes/threads in those specific states get shown. Accepted states are:R(running),S(sleeping),D(disk sleep),I(idle),T(stopped),t(tracing stop),X(dead),Z(zombie) andP(parked). System stats still system wide. Enter with no state โ all (active) processes/threads again. Header line tells you if it's active.Sโ specify search strings for specific logical volume names, specific disk names and specific network interface names. All search strings are interpreted as regular expressions. From then on, only the system resources matching the concerning regex get shown. Enter with no search string โ all (active) system resources of that type again. Header line tells you if it's active.aโ the 'all/active' key, toggles between only showing/accumulating the processes that were active during the last interval (this is the default) and showing/accumulating all processes. Whether it's active can be seen in the header line.Xโ by default,atopshows/accumulates the processes that are alive and the processes that exited during the last interval. With this key (toggle), showing/accumulating the exited processes can be suppressed. Header line shows if it's active.fโ show a fixed (maximum) number of header lines for system resources (toggle). By default only the lines about system resources that really were active during the last interval get shown (CPUs, paging, logical volumes, disks, network interfaces). With this key you can forceatopto show lines of inactive resources too. Header line tells you if it's active.Fโ suppress sorting of system resources (toggle). By default, system resources (CPUs, logical volumes, disks, network interfaces) are sorted on utilization. Header line tells you if it's active.1โ show relevant counters as an average per second (in the format'..../s') instead of as a total during the interval (toggle). Whether this key is active or not can be seen in the header line. ๐lโ lowkey the "bestie, calm down" key ๐ธ it caps how many system-level lines you get for the per-cpu counters, the active disks and the network interfaces. By default you see lines for all CPUs, disks and network interfaces that were active during the last interval โ which is slay until you're on a box with a million CPUs and your terminal is 24 lines tall ๐ญ. Limiting these lines is exactly for that. For all the resources mentioned, the max number of lines can also be set interactively. When you use the-lflag, the max number of per-cpu lines is set to0, the max number of disk lines to5and the max number of interface lines to3. And yes, those values can be modified again in interactive mode ๐kโ send a signal to an active process (a.k.a. kill a process) ๐qโ quit the program, bestie, we're done here. This key works in text mode and bar graph mode ๐PgDnโ show the next page of the process/thread list. With the arrow-down key the list can be scrolled downwards with single lines ๐ฆ^Fโ show the next page of the process/thread list (forward). With the arrow-down key the list can be scrolled downwards with single lines โจPgUpโ show the previous page of the process/thread list. With the arrow-up key the list can be scrolled upwards with single lines ๐ฆ^Bโ show the previous page of the process/thread list (backward). With the arrow-up key the list can be scrolled upwards with single lines โจ^Lโ redraw the screen, because sometimes the vibe gets messed up and you just need a fresh start ๐
๐ RAW DATA STORAGE ๐
Okay so this is the part where atop becomes a whole archivist ๐ซถ. If you want to keep system and process level statistics around for long-term analysis โ like, say, checking the system load and which processes were running yesterday between 3:00 and 4:00 PM โ atop can store all that system and process level data in compressed binary format in a raw file. You do it with the flag -w followed by the filename ๐
If that file already exists and is recognized as a raw data file, atop will append new samples to it (starting with a sample which reflects the activity since boot). If the file does not exist, it will be created โจ
All information about system, processes and thread activity is stored in the raw file. All of it. The whole lore ๐
The interval (default: 10 seconds) and number of samples (default: infinite) can be passed as last arguments. And instead of the number of samples, you can use the flag -S to tell atop that it should finish anyhow before midnight โฐ
A raw file can be read and visualized again with the flag -r followed by the filename. The details here are kinda specific so let's go through them:
- If no filename is specified, the file
/var/log/atop/atop_YYYYMMDDis opened for input (whereYYYYMMDDare digits representing the current date). - If a filename is specified in the format
YYYYMMDD(representing any valid date), the file/var/log/atop/atop_YYYYMMDDis opened. - If a filename with the symbolic name
yis specified, yesterday's daily logfile is opened โ and this can be repeated, soyyyyindicates the logfile of four days ago ๐ต - If the filename
-is used, stdin will be read.
The samples from the file can be viewed interactively using:
- the key
tto show the next sample - the key
Tto show the previous sample - the key
bto branch to a particular time - the key
rto rewind to the begin of the file - the key
Zto fast-forward to the end of the file
These keys work in text mode as well as in bar graph mode, no cap ๐
When output is redirected to a file or pipe, atop prints all samples in plain ASCII. The default line length is 80 characters in that case. With the flag -L followed by an alternate line length, more (or less) columns will be shown ๐
With the flag -b (begin time) and/or -e (end time) followed by a time argument of the form [YYYYMMDD]hhmm[ss], a certain time period within the raw file can be selected ๐ฐ๏ธ
Every day at midnight atop is restarted by the atop-rotate.timer and atop-rotate.service unit files, to write compressed binary data to the file /var/log/atop/atop_YYYYMMDD with an interval of 10 minutes by default. Furthermore all raw files are removed that are older than 28 days (by default) ๐๏ธ
The mentioned default values can be overruled in the file /etc/default/atop, which might contain other values for:
LOGOPTS(by default without any flag)LOGINTERVAL(in seconds, by default600)LOGGENERATIONS(in days, by default28)LOGPATH(directory in which logfiles are stored)
Unfortunately, it is not always possible to keep the format of the raw files compatible in newer versions ofatop, especially when many new counters have to be maintained ๐ญ. Therefore, the programatopconvertis installed to convert a raw file created by an older version ofatopto a raw file that can be read by a newer version ofatop(see the man page ofatopconvertfor more details). Honestly? Iconic of them to give us a converter instead of just letting us suffer ๐ซถ
๐ OUTPUT DESCRIPTION ๐
The header line always shows:
- the host name
- the end date and end time when the sample has been taken
- the current options that are active (only in text mode)
- the elapsed time (duration) of the sample
The verb PAUSED will be shown behind the time when atop is currently paused with the z key โธ๏ธ
The first sample shows the system level activity since boot (the elapsed time in the header shows the time since boot). So like, the first one is always a little extra ๐ฑ
In text mode, atop first shows the lines related to system level activity for every sample. If a particular system resource has not been used during the interval, the entire line related to this resource is suppressed ๐. So the number of system level lines may vary for each sample โ it's giving dynamic layout, honestly.
After that, a list is shown of processes which have been active during the last interval. This list is sorted on CPU consumption by default, but this order can be changed by the keys which are previously described ๐
If values have to be shown by atop which do not fit in the column width, another format is used. Examples, because examples slay:
- If a CPU consumption of
233216milliseconds should be shown in a column width of 4 positions, it is shown as'233s'(in seconds). - For large memory figures, another unit is chosen if the value does not fit (
Mbinstead ofKb,Gbinstead ofMb,Tbinstead ofGb, etcetera). - For other values, a kind of exponent notation is used (value
123456789shown in a column of 5 positions gives123e6).
๐ฅ OUTPUT DESCRIPTION - SYSTEM LEVEL ๐ฅ
The system level information in text mode consists of the following output lines:
๐ PRC โ Process and thread level totals.
This line contains:
- the total CPU time consumed in system mode (
'sys') and in user mode ('user') - the total number of processes present at this moment (
'#proc') - the total number of threads present at this moment in state
'running'('#trun'),'sleeping interruptible'('#tslpi'),'sleeping uninterruptible'('#tslpu') and'idle'('#tidle') - the number of zombie processes (
'#zombie') - the number of clone system calls (
'clones') - the number of processes that ended during the interval (
'#exit') when process accounting is used
Instead of '#exit' the last column may indicate that process accounting could not be activated ('no procacct'). And if the screen-width does not allow all of these counters, only a relevant subset is shown โ it's giving "we trimmed it for the algorithm" ๐
๐ CPU โ CPU utilization.
At least one line is shown for the total occupation of all CPUs together โจ
In case of a multi-processor system, an additional line is shown for every individual processor (with 'cpu' in lower case), sorted on activity. By default, inactive CPUs will not be shown โ nobody wants to hear from the CPU that's just lying there napping ๐ค. The lines showing the per-cpu occupation contain the CPU number in the column combined with the wait percentage.
Beware that the percentages for the total occupation of all CPUs together ('CPU' in upper case) are not reliable when CPUs have been enabled or disabled during the interval! ๐จ No cap, that one's a real caveat.
Every line contains:
- the percentage of CPU time spent in kernel mode by all active processes (
'sys') - the percentage of CPU time consumed in user mode (
'user') for all active processes (including processes running with a nice value larger than zero) - the percentage of CPU time spent for interrupt handling (
'irq') including softirq - the percentage of unused CPU time while no processes were waiting for disk I/O (
'idle') - the percentage of unused CPU time while at least one process was waiting for disk I/O (
'wait')
In case of per-cpu occupation, the CPU number and the wait percentage ('wa') for that CPU are combined. The number of lines showing the per-cpu occupation can be limited ๐
For virtual machines, the steal-percentage ('steal') shows the percentage of CPU time stolen by other virtual machines running on the same hardware ๐ค rude.
For physical machines hosting one or more virtual machines, the guest percentage ('guest') shows the percentage of CPU time used by the virtual machines. Notice that this percentage overlaps the user percentage! ๐ซถ
When PMC performance monitoring counters are supported by the CPU and the kernel (and atop runs with root privileges), the number of instructions per CPU cycle ('ipc') is shown. The first sample always shows the value 'initial', because the counters are just activated at the moment that atop is started โ it's literally brand new, give it a sec ๐ฑ. This also happens in the first sample after CPUs have been enabled or disabled.
Reading the IPC, bestie:
- When the CPU busy percentage is high and the IPC is less than
1.0, it is likely that the CPU is frequently waiting for memory access during instruction execution (larger CPU caches or faster memory might be helpful to improve performance). - When the CPU busy percentage is high and the IPC is greater than
1.0, it is likely that the CPU is instruction-bound (more/faster cores might be helpful to improve performance).
Furthermore, per CPU the effective number of cycles ('cycl') is shown. This value can reach the current CPU frequency if such CPU is 100% busy โก. When an idle CPU is halted, the number of effective cycles can be (considerably) lower than the current frequency. Notice that the average instructions per cycle and number of cycles is shown in the CPU line for all CPUs.
Beware that reading the cycle counter in virtual machines (guests) might introduce performance delays ๐ข. Therefore this metric is by default disabled in virtual machines. However, with the keyword'perfevents'in theatoprcfile this metric can be explicitly set to'enable'or'disable'(see separate man-page ofatoprc). ๐
See also: http://www.brendangregg.com/blog/2017-05-09/cpu-utilization-is-wrong.html ๐ฆ
Okay so when frequency scaling is in play, all those CPU percentages we just talked about are relative to the scaling the CPU actually used during the interval โ no cap. If a CPU was active for e.g. 50% in user mode during the interval while that CPUโs frequency scaling was 40%, then only 20% of the full capacity of the CPU was used in user mode. Math ate, honestly. ๐
If the kernel module cpufreq_stats is active (after issuing modprobe cpufreq_stats), you get the average frequency (avgf) and the average scaling percentage (avgscal). Otherwise you get the current frequency (curf) and the current scaling percentage (curscal) at the exact moment the sample is taken. Notice that average values for frequency and scaling are shown in the CPU line for every CPU. โจ
If the screen-width does not allow all of these counters, only a relevant subset is shown. We love a responsive layout, lowkey.
CPL ๐ป โ CPU load information
This line is literally the load-average tea: figures reflecting the number of threads that are available to run on a CPU (i.e. part of the runqueue) or that are waiting for disk I/O. These figures are averaged over 1 (avg1), 5 (avg5) and 15 (avg15) minutes. Furthermore, you get the number of context switches (csw), the number of serviced interrupts (intr) and the number of available CPUs. Iconic little line.
If the screen-width does not allow all of these counters, only a relevant subset is shown.
GPU ๐ฎ โ GPU utilization (NVIDIA)
Read the section GPU STATISTICS GATHERING in this document to find the details about the activation of the atopgpud daemon. Thatโs the lore you need. ๐ซถ
In the first column of every line, the bus-id (last nine characters) and the GPU number are shown. The subsequent columns show:
gpubusyโ the percentage of time that one or more kernels were executing on the GPU.membusyโ the percentage of time that global (device) memory was being read or written.memoccโ the occupation percentage of memory.totalโ the total memory.usedโ the memory being in use at the moment of the sample.usavgโ the average memory being in use during the sample time.#procโ the number of processes being active on the GPU at the moment of the sample.- the type of GPU.
If the screen-width does not allow all of these counters, only a relevant subset is shown. The number of lines showing the GPUs can be limited. Slay, but make it fit. ๐
MEM ๐ง โ memory occupation (two lines)
Two lines, so many counters, hereโs the full stack:
totโ the total amount of physical memory.freeโ the amount of memory which is currently free.availโ the amount of memory that is available for new workloads without pushing the system into swap.cacheโ the amount of memory in use as page cache including the total resident shared memory.dirtyโ the amount of memory within the page cache that has to be flushed to disk.buffโ the amount of memory used for filesystem meta data.slabโ the amount of memory being used for kernel mallocs.slrecโ the amount of slab memory that is reclaimable.shmemโ the resident size of SYSV shared memory including tmpfs but excluding static huge pages.shrssโ the resident size of SYSV shared memory including static huge pages.shswpโ the amount of SYSV shared memory that is currently swapped.pgtabโ the amount of memory that is currently used for page tables.numnodeโ the number of NUMA nodes in this system.vmbalโ the amount of memory that is currently claimed by vmwareโs balloon driver.zfarcโ the amount of memory that is currently claimed by the ARC (cache) of ZFSonlinux.anthpโ the amount of memory for anonymous transparent huge pages.hptotโ the amount of memory that is claimed for huge pages.hpuseโ the amount of huge page memory that is really in use.tcpsโ the amount of memory that is used for TCP sockets.udpsโ the amount of memory that is used for UDP sockets.
If the screen-width does not allow all of these counters, only a relevant subset is shown. Bestie, there are so many counters. ๐ญ
SWP ๐ โ swap occupation and overcommit info
This line contains:
totโ the total amount of swap space on disk.freeโ the amount of free swap space.swcacโ the size of the swap cache.zswapโ the size of compressed storage used for zswap.zstorโ the real (decompressed) size of the pages stored in zswap.ksuseโ the total size of the memory used for KSM (i.e. shared).kssavโ the total size of the memory saved (deduped) by KSM (i.e. sharing).
Furthermore, the committed virtual memory space (vmcom) and the maximum limit of the committed space (vmlim, which is by default swap size plus 50% of memory size) are shown. The committed space is the reserved virtual space for all allocations of private memory space for processes. The kernel only verifies whether the committed space exceeds the limit if strict overcommit handling is configured (vm.overcommit_memory is 2). Important caveat, bestie โ donโt skip that part. ๐ซถ
LLC ๐ง โ Last-Level Cache of CPU info
This line contains the total memory bandwidth of LLC (tot), the bandwidth of the local NUMA node (loc), and the percentage of LLC in use (LLCXX YY%).
Note that this feature depends on the resctrl pseudo filesystem. Be sure that the kernel is built with the relevant config and take care that the pseudo-filesystem is mounted:
mount -t resctrl resctrl -o mba_MBps /sys/fs/resctrl (on Intel)
mount -t resctrl resctrl -o cdp /sys/fs/resctrl (on AMD)
NUM ๐งฉ โ memory utilization per NUMA node (not shown for single NUMA node)
This line shows:
totโ the total amount of physical memory of this node.freeโ the amount of free memory.fileโ the amount of memory for cached file data.dirtyโ modified cached file data.activโ recently used memory.inactโ less recently used memory.slabโ memory being used for kernel mallocs.slrecโ the amount of slab memory that is reclaimable.shmemโ shared memory including tmpfs.hptotโ total huge pages.hpuseโ used huge pages.fragโ the fragmentation percentage.
NUC โก โ CPU utilization per NUMA node (not shown for single NUMA node)
This line shows the utilization percentages of all CPUs related to this NUMA node, categorized for:
sysโ system mode.userโ user mode.nicedโ user mode for niced processes.idleโ idle mode.- wait mode โ
wpreceded by the node number. irqโ irq mode.sirqโ softirq mode.stealโ steal mode.guestโ guest mode overlapping user mode.
PAG ๐ธ โ paging frequency
This line contains:
scanโ the number of scanned pages due to the fact that free memory drops below a particular threshold.stealโ the number of reclaimed pages due to the fact that free memory drops below a particular threshold.stallโ the number times that the kernel tries to reclaim pages due to an urgent need.compactโ the number of process stalls to run memory compaction to allocate huge pages.numamigโ the number of NUMA pages migrated.migrateโ the total number of memory pages migrated successfully e.g. between NUMA nodes or for compaction.pginโ the number of memory pages the system read from block devices.pgoutโ the number of memory pages the system wrote to block devices.zswinโ the number of memory pages swapped in from zswap.zswoutโ the number of memory pages swapped out to zswap.swinโ the number of memory pages the system read from swap space.swoutโ the number of memory pages the system wrote to swap space.oomkillโ the number of out-of-memory kills. ๐
PSI ๐ฆ โ Pressure Stall Information
This line contains percentages about resource pressure related to CPU, memory and disk I/O. Certain percentages refer to some, meaning that some processes/threads were delayed due to resource overload. Other percentages refer to full, meaning a loss of overall throughput due to resource overload.
The values cpusome, memsome, memfull, iosome and iofull show the pressure percentage during the entire interval.
The values cs (cpu some), ms (memory some), mf (memory full), is (I/O some) and if (I/O full) each show three percentages separated by slashes: pressure percentage over the last 10, 60 and 300 seconds. The way that slash notation ate is real. ๐
For some Linux distributions PSI support might be disabled by default. In that case you need to pass psi=1 on the kernel command line during boot.
๐งฎ LVM/MDD/DSK โ logical volume/multiple device/disk utilization
Per active unit one line is produced, sorted on unit activity. Such line shows:
- the name (e.g.
VolGroup00-lvtmpfor a logical volume orsdafor a hard disk). busyโ the percentage of elapsed time during which I/O requests were issued to the device. Note that for devices serving requests in parallel, such as RAID arrays, SSD and NVMe, this number does not reflect their performance limits.readโ the number of read requests issued.writeโ the number of write requests issued.discrdโ the number of discard requests issued, if supported by kernel version.KiB/rโ the number of KiBytes per read.KiB/wโ the number of KiBytes per write.KiB/dโ the number of KiBytes per discard, if supported by kernel version.MBr/sโ the number of MiBytes per second throughput for reads.MBw/sโ the number of MiBytes per second throughput for writes.infltโ requests issued to the device driver but not completed.avqโ the average queue depth while busy.avioโ the average number of milliseconds needed by a request for seek, latency and data transfer.
If the screen-width does not allow all of these counters, only a relevant subset is shown.
The number of lines showing the units can be limited per class (LVM, MDD or DSK) with the l key or statically (see separate man-page of atoprc). By specifying the value 0 for a particular class, no lines will be shown any more for that class. Periodt. ๐
NFM โ Network Filesystem (NFS) mount at the client side. For each NFS-mounted filesystem, you get one line, bestie, and it shows the mounted server directory, the name of the server ('srv'), the total number of bytes physically read from the server ('read') and the total number of bytes physically written to the server ('write'). The data transfer is broken down into the number of bytes read via normal read() system calls ('nread'), the number of bytes written via normal write() system calls ('nwrit'), the number of bytes read via direct I/O ('dread'), the number of bytes written via direct I/O ('dwrit'), the number of bytes read via page cache read-ahead pages ('mread'), and the number of bytes written via page cache write-back pages ('mwrit'), i.e. asynchronous flushes. That's a lot of little counters, but they all matter.
NFC โ Network Filesystem (NFS) client side counters. This line has the number of RPC calls issued by local processes ('rpc'), the number of read RPC calls ('read') and write RPC calls ('rpwrite') issued to the NFS server, the number of RPC calls being retransmitted ('retxmit') and the number of authorization refreshes ('autref'). Client-side receipts, basically.
NFS โ Network Filesystem (NFS) server side counters. This line has the number of RPC calls received from NFS clients ('rpc'), the number of read RPC calls received ('cread'), the number of write RPC calls received ('cwrit'), the number of Megabytes/second returned to read requests by clients ('MBcr/s'), the number of Megabytes/second passed in write requests by clients ('MBcw/s'), the number of network requests handled via TCP ('nettcp'), the number of network requests handled via UDP ('netudp'), the number of reply cache hits ('rchits'), the number of reply cache misses ('rcmiss') and the number of uncached requests ('rcnoca'). Furthermore there are some error counters indicating the number of requests with a bad format ('badfmt') or a bad authorization ('badaut'), and a counter indicating the number of bad clients ('badcln'). Server said โhere's the whole vibe check,โ and this is it.
NET โ Network utilization (TCP/IP). One line is shown for activity of the transport layer (TCP and UDP), one line for the IP layer, and one line per active interface. For the transport layer, the counters shown are about the number of received TCP segments including those received in error ('tcpi'), the number of transmitted TCP segments excluding those containing only retransmitted octets ('tcpo'), the number of UDP datagrams received ('udpi'), the number of UDP datagrams transmitted ('udpo'), the number of active TCP opens ('tcpao'), the number of passive TCP opens ('tcppo'), the number of TCP output retransmissions ('tcprs'), the number of TCP input errors ('tcpie'), the number of TCP output resets ('tcpor'), the number of UDP no ports ('udpnp'), the number of UDP input errors ('udpie'), and the number of TCP incorrect checksums ('csumie'). If the screen-width does not allow all of these counters, only a relevant subset is shown. These counters are related to IPv4 and IPv6 combined. Combined! Equality! We love to see it.
For the IP layer, the counters shown are about the number of IP datagrams received from interfaces, including those received in error ('ipi'), the number of IP datagrams that local higher-layer protocols offered for transmission ('ipo'), the number of received IP datagrams which were forwarded to other interfaces ('ipfrw'), the number of IP datagrams which were delivered to local higher-layer protocols ('deliv'), the number of received ICMP datagrams ('icmpi'), and the number of transmitted ICMP datagrams ('icmpo'). If the screen-width does not allow all of these counters, only a relevant subset is shown. These counters are related to IPv4 and IPv6 combined.
For every active network interface, one line is shown, sorted on the interface activity. Such a line shows the name of the interface and its busy percentage in the first column. The busy percentage for half duplex is determined by comparing the interface speed with the number of bits transmitted and received per second; for full duplex the interface speed is compared with the highest of either the transmitted or the received bits. When the interface speed can not be determined (e.g. for the loopback interface), '---' is shown instead of the percentage. Furthermore it shows the number of received packets ('pcki'), the number of transmitted packets ('pcko'), the line speed of the interface ('sp'), the effective amount of bits received per second ('si'), the effective amount of bits transmitted per second ('so'), the number of collisions ('coll'), the number of received multicast packets ('mlti'), the number of errors while receiving a packet ('erri'), the number of errors while transmitting a packet ('erro'), the number of received packets dropped ('drpi'), and the number of transmitted packets dropped ('drpo'). If the screen-width does not allow all of these counters, only a relevant subset is shown. The number of lines showing the network interfaces can be limited. Interface lines understood: your network is doing cardio and we're watching.
IFB โ Infiniband utilization. For every active Infiniband port, one line is shown, sorted on activity. Such a line shows the name of the port and its busy percentage in the first column. The busy percentage is determined by taking the highest of either the transmitted or the received bits during the interval, multiplying that value by the number of lanes, and comparing it against the maximum port speed. Furthermore it shows the number of received packets divided by the number of lanes ('pcki'), the number of transmitted packets divided by the number of lanes ('pcko'), the maximum line speed ('sp'), the effective amount of bits received per second ('si'), the effective amount of bits transmitted per second ('so'), and the number of lanes ('lanes'). If the screen-width does not allow all of these counters, only a relevant subset is shown. The number of lines showing the Infiniband ports can be limited. Lanes divided packets? It's giving very specific math and honestly? Respect.
๐ OUTPUT DESCRIPTION - CGROUPS LEVEL (V2) ๐
In the bottom part of the screen, a hierarchical list of cgroups can be shown. By default, cgroups without assigned processes in the cgroup itself and the cgroups underneath will be suppressed. By pressing the 'a' key (toggle) all cgroups will be shown. Toggle queen behavior.
When depth level '8' or '9' has been selected (by pressing the corresponding key) the assigned processes are shown as well. By default, only the processes that were active during the interval. By pressing the 'a' key (toggle) all processes will be shown.
Per cgroup the following fields may be shown (in alphabetical order), depending on the current width of your window:
CGROUPโ Name of the cgroup (version 2), i.e. the directory name in the cgroup hierarchy. This root cgroup'/'corresponds to the cgroup root directory, which is usually'/sys/fs/cgroup'.CPUBUSYโ The consumed CPU percentage by this cgroup and all cgroups underneath (as a percentage of one CPU). Value-1means undefined.CPUMAXโ The'cpu.max'value of this cgroup (version 2), calculated as percentage of one CPU. Value-1means maximum, while value-2means undefined.CPUPSโ The CPU pressure percentage ('some') in this cgroup and cgroups underneath. For some Linux distributions PSI support might be disabled by default. In that case you need to passpsi=1on the kernel command line during boot.CPUWGTโ The'cpu.weight'value of this cgroup (version 2). Value-2means undefined.DISKIOโ The amount of data transferred to/from physical disks in this cgroup and the cgroups underneath. Value-1means undefined.DSKPSโ The disk pressure percentage ('full') in this cgroup and cgroups underneath. For some Linux distributions PSI support might be disabled by default. In that case you need to passpsi=1on the kernel command line during boot.IOWGTโ The'io.weight'value of this cgroup (version 2). Value-2means undefined.MEMMAXโ The'memory.max'value of this cgroup (version 2). Value-1means maximum, while value-2means undefined.MEMORYโ The current memory occupation ('memory.current'value) of this cgroup and all cgroups underneath. Value-1means undefined.
Notice that the memory occupation of a cgroup implies all memory pages that are first referenced (faulted in) from such cgroup. So apart from resident process pages, the cgroup memory includes all page cache pages, slab cache pages, tmpfs pages and shared memory pages that are first referenced by a process in this cgroup.
This means that the cgroup memory might be much higher than the cumulated memory consumption (RSS) of the processes in the cgroup (shown after pressing the key '8' or '9'). However, the cgroup memory might also be lower than the cumulated memory consumption of the processes in the cgroup, when these processes share code pages, shared library pages, shared memory pages or mmapped pages that have been assigned (i.e. first referenced) by processes in other cgroups. Memory accounting is complicated, bestie. Don't start drama between cgroups.
MEMPSโ The memory pressure percentage ('full') in this cgroup and cgroups underneath. For some Linux distributions PSI support might be disabled by default. In that case you need to passpsi=1on the kernel command line during boot.NPROCSโ The number of processes assigned to this cgroup.PBELOWโ The number of processes assigned to the cgroups underneath this cgroup.SWPMAXโ The'memory.swap.max'value of this cgroup (version 2). Value-1means maximum, while value-2means undefined.
๐ฆ OUTPUT DESCRIPTION - PROCESS LEVEL ๐ฆ
In the bottom part of the screen, a list of processes can be shown from which the resource utilization has changed during the last interval. These processes might have used CPU time or might have issued disk or network requests. However a process is also shown if part of it has been paged out due to lack of memory (while the process itself was in sleep state). Sleeping but still relevant? Relatable.
Per process the following fields may be shown (in alphabetical order), depending on the current output mode as described in the section INTERACTIVE COMMANDS and depending on the current width of your window:
AVGRSZโ The average size of one read-action on disk.AVGWSZโ The average size of one write-action on disk.
okay bestie, still deep in the process-level field list and we're not stopping, because every single one of these columns matters. ๐
BANDWIโ the total bandwidth for received TCP and UDP packets that this process ate up, in bits-per-second. You can compare it with the value'si'on interface level (that's used bandwidth per interface) โจ. This info only shows up when the optional modulenetatopornetatop-bpfis loaded.BANDWOโ same vibe but for sent TCP and UDP packets, again bits-per-second. Compare this one with the value'so'on interface level (used bandwidth per interface). Also only shown when the optional modulenetatopornetatop-bpfis loaded, no cap.BDELAYโ aggregated block I/O delay, meaning the time spent waiting for disk I/O ๐ญ. Heads up though: on modern kernels this value is only maintained when the kernel parameter/proc/sys/kernel/task_delayacctis set to1(and you can manage that by settingkernel.task_delayacct=1with thesysctlcommand). Otherwise? This value is literally always zero, every time.CID/PODโ the container id (think Docker or Podman) or pod name (think Kubernetes) referring to the container/pod that this process/thread is running inside ๐ฆ. When a pod name is longer than 15 characters, only the last 15 characters get shown.- If a process got started and finished during the last interval, a
'?'is shown, because the container id or pod name is not part of the standard process accounting record. - This column only shows up when
atopruns with superuser privileges and at least one containerized process is detected.
- If a process got started and finished during the last interval, a
CMDโ the name of the process ๐ท๏ธ. This name can be surrounded by "less/greater than" signs ('<name>'), which means the process finished during the last interval. A single accounting record is written for the entire process on termination of the last thread in the process. When the main thread exits, the process name gets changed to the thread name. Behind the abbreviationCMDin the header line, the current page number and the total number of pages of the process/thread list are shown โ so you always know where you are, iykyk.COMMAND-LINEโ the full command line of the process, arguments included ๐ซถ. If the command line is longer than the screen line, you can use the arrow keys->and<-to horizontally scroll.- The
-z <regex>command line option can be used to prepend matching environment variables to the displayed command line. POSIX Extended Regular Expression syntax is used (seeregex(3)). When a matching environment variable is too long (like, exceeding the buffer that should contain the command line), it will be truncated. - Usually only the environment variables of processes running under your own user ID get shown, unless you're a privileged user.
- Behind the verb
COMMAND-LINEin the header line, the current page number and total number of pages of the process/thread list are shown too.
- The
โ ๏ธ WARNING: don't use this flag when writing to a (publicly readable) raw file! You might expose sensitive environment variables to the readers of that raw file. That's giving data leak energy and we are NOT here for it. ๐
CPUโ the occupation percentage of this process, relative to the available capacity for this resource on system level ๐ฅ.CPUNRโ the identification of the CPU that the (main) thread is running on, or has recently been running on.CTIDโ the container ID (OpenVZ). If a process was started and finished during the last interval, a'?'is shown, because the container ID is not part of the standard process accounting record.DSKโ the occupation percentage of this process relative to the total load produced by all processes (i.e. total disk accesses by all processes during the last interval) ๐พ. This info shows up when per-process "storage accounting" is active in the kernel.EGIDโ the effective group-id under which this process executes. When the name is longer than 8, or when the-Iflag is used, the number is shown instead of the name. However, when the-iflag is used, the full group name will be shown โจ.ENDATEโ the date that the process finished. If the process is still running, this field shows'active'.ENTIMEโ the time that the process finished. If the process is still running, this field shows'active'.ENVIDโ the virtual environment identified (OpenVZ only).EUIDโ the effective user-id under which this process executes. When the name is longer than 8, or when the-Iflag is used, the number is shown instead of the name. But when the-iflag is used, the full user name will be shown ๐EXCโ the exit code of a terminated process (that's when the second position of column'ST'isE), or the fatal signal number (when the second position of column'ST'isSorC) ๐.FSGIDโ the filesystem group-id under which this process executes. When the name is longer than 8, or when the-Iflag is used, the number is shown instead of the name.FSUIDโ the filesystem user-id under which this process executes. When the name is longer than 8, or when the-Iflag is used, the number is shown instead of the name.GPUโ the GPU percentage reflects the GPU busy percentage ๐ฎ.GPUBUSYโ busy percentage on all GPUs (one GPU is 100%).GPUNUMSโ a comma-separated list of the GPUs used by the process during the interval. When that comma-separated list exceeds the width of the column, a hexadecimal value is shown instead.LOCKSZโ the virtual amount of memory being locked (i.e. non-swappable) by this process (or user) ๐.MAJFLTโ the number of page faults issued by this process that were solved by creating/loading the requested memory page.MEMโ the occupation percentage of this process relative to the available capacity for this resource on system level ๐ธ.MEMAVGโ average memory occupation during the interval on all used GPUs.MEMBUSYโ busy percentage of memory on all GPUs (one GPU is 100%), i.e. the time needed for read and write accesses on memory.MEMNOWโ memory occupation at the moment of the sample on all used GPUs.MINFLTโ the number of page faults issued by this process that were solved by reclaiming the requested memory page from the free list of pages.NETโ the occupation percentage of this process relative to the total load produced by all processes (i.e. consumed network bandwidth of all processes during the last interval) ๐. Again, this info only shows up when the optional modulenetatopornetatop-bpfis loaded.NICEโ the more-or-less static priority that can be given to a process, on a scale from-20(high priority) to+19(low priority).NIVCSWโ number of times the process/thread was context-switched involuntarily, in the case that the time slice expired.NPROCSโ the number of active and terminated processes accumulated for this user or program.NVCSWโ number of times the process/thread was context-switched voluntarily, in the case of a blocking system call, e.g. waiting for an I/O operation to complete.OOMADJโ the value that adjusts the OOM score value of this process (usually 2/3 of this value is taken for adjustment), in a range from-1000till+1000. Value-1000means the process will never be killed due to OOM killing โ it's literally immortal, main character energy ๐.OOMSCโ the Out-Of-Memory (OOM) score of this process, in a range from0till2000. The higher this value, the more likely this process gets killed when the system runs out of memory (and swap space) ๐.PIDโ process-id. If a process was started and finished during the last interval, a'?'is shown, because the process-id is not part of the standard process accounting record.POLIโ the policies'norm'(normal, which isSCHED_OTHER),'btch'(batch) and'idle'refer to timesharing processes. The policies'fifo'(SCHED_FIFO) and'rr'(round robin, which isSCHED_RR) refer to realtime processes โก.PPIDโ parent process-id. If a process was started and finished during the last interval, value0is shown, because the parent process-id is not part of the standard process accounting record.PRIโ the process' priority ranges from0(highest priority) to139(lowest priority). Priority0to99are used for realtime processes (fixed priority independent of their behavior) and priority100to139for timesharing processes (variable priority depending on their recent CPU consumption and the nice value).PSIZEโ the proportional memory size of this process (or user) ๐ง . Every process shares resident memory with other processes โ like, when a particular program is started several times, the code pages (text) are only loaded once in memory and shared by all incarnations. Also the code of shared libraries is shared by all processes using that shared library, as well as shared memory and memory-mapped files. For thePSIZEcalculation of a process, the resident memory of a process that is shared with other processes is divided by the number of sharers. This means every process is accounted for a proportional part of that memory. Accumulating thePSIZEvalues of all processes in the system gives a reliable impression of the total resident memory consumed by all processes โ iconic, honestly.- Since gathering all the values needed to calculate
PSIZEis a very time-consuming task, the'R'key (or-Rflag) should be active. Gathering these values also requires superuser privileges (otherwise'?K'is shown in the output). - If a process has finished during the last interval, no value is shown, since the proportional memory size is not part of the standard process accounting record.
- Since gathering all the values needed to calculate
RDDSKโ the read data transfer actually issued physically on disk (so like, reading from the disk cache does not count here, bestie). Unfortunately, the kernel aggregates the data transfer of a process into the data transfer of its parent process when it terminates. So you might see transfers for (parent) processes likebashorsystemdthat were not really issued by them but by their terminated child processes. ๐ญRDELAYโ runqueue delay, i.e. time spent waiting on a runqueue. ๐คRGIDโ the real group-id under which the process executes. When the name is longer than 8 or when the-Iflag is used, the number is shown instead of the name. However, when the-iflag is used, the full group name will be shown. ๐RGROWโ the amount of resident memory that the process has grown during the last interval. A resident growth can be caused by touching memory pages which were not physically created/loaded before (load-on-demand). Note that a resident growth can also be negative, e.g. when part of the process is paged out due to lack of memory or when the process frees dynamically allocated memory. For a process which started during the last interval, the resident growth reflects the total resident size of the process at that moment. If a process has finished during the last interval, no value is shown since resident memory occupation is not part of the standard process accounting record. ๐ซRNETโ the number of TCP- and UDP packets received by this process. This information will only be shown when the optional modulenetatopornetatop-bpfis installed. ๐ฆ If a process has finished during the last interval, no value is shown since network counters are not part of the standard process accounting record.RSIZEโ the total resident memory usage consumed by this process (or user). Notice that theRSIZEof a process includes all resident memory used by that process, even if certain memory parts are shared with other processes (see also the explanation ofPSIZE). ๐ If a process has finished during the last interval, no value is shown since resident memory occupation is not part of the standard process accounting record.RTPRโ realtime priority according the POSIX standard. Value can be0for a timesharing process (policy'norm','btch'or'idle') or ranges from1(lowest) till99(highest) for a realtime process (policy'rr'or'fifo'). โกRUIDโ the real user-id under which the process executes. When the name is longer than 8 or when the-Iflag is used, the number is shown instead of the name. However, when the-iflag is used, the full user name will be shown. ๐Sโ the current state of the (main) thread:'R'for running (currently processing or in the runqueue),'S'for sleeping interruptible (wait for an event to occur),'D'for sleeping non-interruptible,'Z'for zombie (waiting to be synchronized with its parent process),'T'for stopped (suspended or traced),'W'for swapping, and'E'(exit) for processes which have finished during the last interval. ๐งSGIDโ the saved group-id of the process. When the name is longer than 8 or when the-Iflag is used, the number is shown instead of the name. โจSNETโ the number of TCP and UDP packets transmitted by this process. This information will only be shown when the optional modulenetatopornetatop-bpfis installed. ๐ฆSTโ the status of a process. ๐ The first position indicates if the process has been started during the last interval (the valueNmeans 'new process'). The second position indicates if the process has been finished during the last interval. The valueEmeans 'exit' on the process' own initiative; the exit code is displayed in the column'EXC'. The valueSmeans that the process has been terminated unvoluntarily by a signal; the signal number is displayed in the in the column'EXC'. The valueCmeans that the process has been terminated unvoluntarily by a signal, producing a core dump in its current directory; the signal number is displayed in the column'EXC'. ๐STDATEโ the start date of the process. ๐STTIMEโ the start time of the process. โฐSUIDโ the saved user-id of the process. When the name is longer than 8 or when the-Iflag is used, the number is shown instead of the name. ๐ธSWAPSZโ the swap space consumed by this process (or user). ๐SYSCPUโ CPU time consumption of this process in system mode (kernel mode), usually due to system call handling. ๐ฅTCPRASZโ the average size of a received TCP buffer in bytes. This information will only be shown when the optional modulenetatopornetatop-bpfis installed. ๐TCPRCVโ the number of TCP packets received for this process. This information will only be shown when the optional modulenetatopornetatop-bpfis installed. ๐ฅTCPSASZโ the average size of a transmitted TCP buffer in bytes. This information will only be shown when the optional modulenetatopornetatop-bpfis installed. ๐TCPSNDโ the number of TCP packets transmitted for this process. This information will only be shown when the optional modulenetatopornetatop-bpfis installed. ๐คTHRโ total number of threads within this process. All related threads are contained in a thread group, represented byatopas one line or as a separate line when the'y'key (or-yflag) is active. ๐งต On Linux 2.4 systems it is hardly possible to determine which threads (i.e. processes) are related to the same thread group. Every thread is represented byatopas a separate line. ๐ฆTIDโ thread-id. All threads within a process run with the samePIDbut with a differentTID. This value is shown for individual threads in multi-threaded processes (when using the key'y'). ๐TIDLEโ number of threads within this process that are in the state'idle'(I), i.e. uninterruptible sleeping threads that do not count for the load average. ๐ดTRUNโ number of threads within this process that are in the state'running'(R). ๐โโ๏ธTSLPIโ number of threads within this process that are in the state'interruptible sleeping'(S). ๐คTSLPUโ number of threads within this process that are in the state'uninterruptible sleeping'(D). ๐ถโ๐ซ๏ธUDPRASZโ the average size of a received UDP packet in bytes. This information will only be shown when the optional modulenetatopornetatop-bpfis installed. ๐UDPRCVโ the number of UDP packets received by this process. This information will only be shown when the optional modulenetatopornetatop-bpfis installed. ๐ฅUDPSASZโ the average size of a transmitted UDP packets in bytes. This information will only be shown when the optional modulenetatopornetatop-bpfis installed. ๐UDPSNDโ the number of UDP packets transmitted by this process. This information will only be shown when the optional modulenetatopornetatop-bpfis installed. ๐คUSRCPUโ CPU time consumption of this process in user mode, due to processing the own program text. ๐ฅVDATAโ the virtual memory size of the private data used by this process (including heap and shared library data). ๐๏ธVGROWโ the amount of virtual memory that the process has grown during the last interval. A virtual growth can be caused by e.g. issuing amalloc()or attaching a shared memory segment. Note that a virtual growth can also be negative by e.g. issuing afree()or detaching a shared memory segment. For a process which started during the last interval, the virtual growth reflects the total virtual size of the process at that moment. If a process has finished during the last interval, no value is shown since virtual memory occupation is not part of the standard process accounting record. ๐ซVPIDโ virtual process-id (within an OpenVZ container). If a process has been started and finished during the last interval, a'?'is shown because the virtual process-id is not part of the standard process accounting record. ๐ฆVSIZEโ the total virtual memory usage consumed by this process (or user). ๐ If a process has finished during the last interval, no value is shown since virtual memory occupation is not part of the standard process accounting record.VSLIBSโ the virtual memory size of the (shared) text of all shared libraries used by this process. ๐VSTACKโ the virtual memory size of the (private) stack used by this process. ๐ฅVSTEXTโ the virtual memory size of the (shared) text of the executable program. ๐WCHANโ wait channel of thread in sleep state, i.e. the name of the kernel function in which the thread has been put asleep. ๐ด Since determining the name string of the kernel function is a relatively time-consuming task, the'W'key (or'-W'flag) should be active. โ ๏ธWRDSKโ the write data transfer issued physically on disk (so writing to the disk cache is not accounted for). This counter is maintained for the application process that writes its data to the cache (assuming that this data is physically transferred to disk later on). Notice that disk I/O needed for swapping is not taken into account. ๐พ Unfortunately, the kernel aggregates the data transfer of a process to the data transfer of its parent process when terminating. So you might see transfers for (parent) processes likebashorsystemdthat are not really issued by them but by their terminated child processes. ๐ญWCANCLโ the write data transfer previously accounted for this process or another process that has been cancelled. Suppose that a process writes new data to a file and that data is removed again before the cache buffers have been flushed to disk. Then the original process shows the written data asWRDSK, while the process that removes/truncates the file shows the unflushed removed data asWCANCL. ๐๏ธโจ
โจ PARSABLE OUTPUT โจ
Okay bestie, if you want output that a script can actually digest instead of the interactive glow-up, this is the mode. ๐ With the flag -P followed by a list of one or more labels (comma-separated), parsable output is produced for each sample.
The labels that can be specified for system-level statistics correspond to the labels (first verb of each line) that can be found in the interactive output: CPU, cpu, CPL, GPU, MEM, SWP, PAG, PSI, LVM, MDD, DSK, NFM, NFC, NFS, NET, IFB, LLC, NUM and NUC.
For cgroup-level statistics the label CGR is available.
For process-level statistics special labels are available: PRG (general), PRC (CPU), PRE (GPU), PRM (memory), PRD (disk, but requires special privileges) and PRN (network, only if the optional module netatop or netatop-bpf is installed). With the label ALL, all system and process level statistics are shown.
The command and command line in the parsable output might contain spaces and are therefore by default surrounded by parenthesis. However, since a space is often used as separator between the fields by parsing tools, with the additional flag -Z it is possible to exchange the spaces in the command (line) by underscores and omit the parenthesis.
For every interval all requested lines are shown whereafter atop shows a line just containing the label SEP as a separator before the lines for the next sample are generated. When a sample contains the values since boot, atop shows a line just containing the label RESET before the lines for this sample are generated.
The first part of each output-line consists of the following six fields:
labelโ the name of the labelhostโ the name of this machineepochโ the time of this interval as number of seconds since 1-1-1970dateโ date of this interval in formatYYYY/MM/DDtimeโ time of this interval in formatHH:MM:SSintervalโ number of seconds elapsed for this interval
The subsequent fields of each output-line depend on the label:
CPUโ Subsequent fields: total number of clock-ticks per second for this machine, number of processors, consumption for all CPUs in system mode (clock-ticks), consumption for all CPUs in user mode (clock-ticks), consumption for all CPUs in user mode for niced processes (clock-ticks), consumption for all CPUs in idle mode (clock-ticks), consumption for all CPUs in wait mode (clock-ticks), consumption for all CPUs in irq mode (clock-ticks), consumption for all CPUs in softirq mode (clock-ticks), consumption for all CPUs in steal mode (clock-ticks), consumption for all CPUs in guest mode (clock-ticks) overlapping user mode, frequency of all CPUs (MHz), frequency percentage of all CPUs, instructions executed by all CPUs and cycles for all CPUs.cpuโ Subsequent fields: total number of clock-ticks per second for this machine, processor-number, consumption for this CPU in system mode (clock-ticks), consumption for this CPU in user mode (clock-ticks), consumption for this CPU in user mode for niced processes (clock-ticks), consumption for this CPU in idle mode (clock-ticks), consumption for this CPU in wait mode (clock-ticks), consumption for this CPU in irq mode (clock-ticks), consumption for this CPU in softirq mode (clock-ticks), consumption for this CPU in steal mode (clock-ticks), consumption for this CPU in guest mode (clock-ticks) overlapping user mode, frequency of this CPU (Mhz), frequency percentage of this CPU, instructions executed by this CPU and cycles for this CPU.CPLโ Subsequent fields: number of processors, load average for last minute, load average for last five minutes, load average for last fifteen minutes, number of context-switches, and number of device interrupts.GPUโ Subsequent fields: GPU number, bus-id string, type of GPU string, GPU busy percentage during last second (-1 if not available), memory busy percentage during last second (-1 if not available), total memory size (KiB), used memory (KiB) at this moment, number of samples taken during interval, cumulative GPU busy percentage during the interval (to be divided by the number of samples for the average busy percentage, -1 if not available), cumulative memory busy percentage during the interval (to be divided by the number of samples for the average busy percentage, -1 if not available), and cumulative memory occupation during the interval (to be divided by the number of samples for the average occupation).MEMโ Subsequent fields: page size for this machine (in bytes), size of physical memory (pages), size of free memory (pages), size of page cache (pages), size of buffer cache (pages), size of slab (pages), dirty pages in cache (pages), reclaimable part of slab (pages), total size of vmware's balloon pages (pages), total size of shared memory (pages), size of resident shared memory (pages), size of swapped shared memory (pages), smaller huge page size (in bytes), total size of smaller huge pages (huge pages), size of free smaller huge pages (huge pages), size of ARC (cache) of ZFSonlinux (pages), size of sharing pages for KSM (pages), size of shared pages for KSM (pages), size of memory used for TCP sockets (pages), size of memory used for UDP sockets (pages), size of pagetables (pages), larger huge page size (in bytes), total size of larger huge pages (huge pages), size of free larger huge pages (huge pages), size of available memory (pages) for new workloads without swapping, and size of anonymous transparent huge pages ('normal'pages).SWPโ Subsequent fields: page size for this machine (in bytes), size of swap (pages), size of free swap (pages), size of swap cache (pages), size of committed space (pages), limit for committed space (pages), size of the swap cache (pages), the real (decompressed) size of the pages stored in zswap (pages), and the size of compressed storage used for zswap (pages).LLCโ Subsequent fields: LLC id, percentage of LLC in use, total memory bandwidth of this LLC (in bytes), and memory bandwidth on local NUMA node of this LLC (in bytes).PAGโ Subsequent fields: page size for this machine (in bytes), number of page scans, number of allocstalls, 0 (future use), number of swapins, number of swapouts, number of oomkills (-1 when counter not present), number of process stalls to run memory compaction, number of pages successfully migrated in total, number of NUMA pages migrated, number of pages read from block devices, number of pages written to block devices, number of swapins from zswap, and number of swapouts to zswap.PSIโ Subsequent fields: PSI statistics present on this system (n or y), CPU some avg10, CPU some avg60, CPU some avg300, CPU some accumulated microseconds during interval, memory some avg10, memory some avg60, memory some avg300, memory some accumulated microseconds during interval, memory full avg10, memory full avg60, memory full avg300, memory full accumulated microseconds during interval, I/O some avg10, I/O some avg60, I/O some avg300, I/O some accumulated microseconds during interval, I/O full avg10, I/O full avg60, I/O full avg300, and I/O full accumulated microseconds during interval.LVM/MDD/DSKโ For every logical volume/multiple device/hard disk one line is shown. Subsequent fields: name, number of milliseconds spent for I/O, number of reads issued, number of sectors transferred for reads, number of writes issued, number of sectors transferred for write, number of discards issued (-1 if not supported), number of sectors transferred for discards, number of requests currently in flight (not yet completed), and the average queue depth while the disk was busy.NFMโ Subsequent fields: mounted NFS filesystem, total number of bytes read, total number of bytes written, number of bytes read by normal system calls, number of bytes written by normal system calls, number of bytes read by direct I/O, number of bytes written by direct I/O, number of pages read for page cache read-ahead, and number of pages written for page cache write-back (asynchronous flushes).NFCโ Subsequent fields: number of transmitted RPCs, number of transmitted read RPCs, number of transmitted write RPCs, number of RPC retransmissions, and number of authorization refreshes.NFSโ Subsequent fields: number of handled RPCs, number of received read RPCs, number of received write RPCs, number of bytes read by clients, number of bytes written by clients, number of RPCs with bad format, number of RPCs with bad authorization, number of RPCs from bad client, total number of handled network requests, number of handled network requests via TCP, number of handled network requests via UDP, number of handled TCP connections, number of hits on reply cache, number of misses on reply cache, and number of uncached requests.NETโ First, one line is produced for the upper layers of the TCP/IP stack. Subsequent fields: the verb"upper", number of packets received by TCP, number of packets transmitted by TCP, number of packets received by UDP, number of packets transmitted by UDP, number of packets received by IP, number of packets transmitted by IP, number of packets delivered to higher layers by IP, number of packets forwarded by IP, number of input errors (UDP), number of noport errors (UDP), number of active opens (TCP), number of passive opens (TCP), number of established connections at this moment (TCP), number of retransmitted segments (TCP), number of input errors (TCP), number of output resets (TCP), and number of checksum errors on received packets (TCP).
okay so next up: for every interface you get exactly one line ๐ and here's everything crammed into it, field by field, in order:
- name of the interface
- number of packets received by the interface
- number of bytes received by the interface
- number of packets transmitted by the interface
- number of bytes transmitted by the interface
- interface speed
- duplex mode (
0=half,1=full) - receive errors
- transmit errors
- receive drops
- transmit drops
- receive fifo
- transmit fifo
- receive compressed
- transmit compressed
- receive framing errors
- receive multicast
- transmit collisions
- transmit carrier
๐ฆ IFB
InfiniBand girlies rise ๐ it's the same deal, one record with these fields:
- name of the InfiniBand interface
- port number
- number of lanes
- maximum rate (Mbps)
- number of bytes received
- number of bytes transmitted
- number of packets received
- number of packets transmitted
๐ธ NUM
Per NUMA node, bestie โ and it is stacked with fields:
- NUMA node number
- page size for this machine (in bytes)
- the fragmentation percentage of this node
- size of physical memory (pages)
- size of free memory (pages)
- recently (active) used memory (pages)
- less recently (inactive) used memory (pages)
- size of cached file data (pages)
- dirty pages in cache (pages)
- slab memory being used for kernel mallocs (pages)
- slab memory that is reclaimable (pages)
- shared memory including tmpfs (pages)
- total huge pages (huge pages)
- free huge pages (huge pages)
โญ NUC
NUMA node CPU consumption, no cap ๐ฅ fields go like this:
- NUMA node number
- number of processors for this node
- consumption for node CPUs in system mode (clock-ticks)
- consumption for node CPUs in user mode (clock-ticks)
- consumption for node CPUs in user mode for niced processes (clock-ticks)
- consumption for node CPUs in idle mode (clock-ticks)
- consumption for node CPUs in wait mode (clock-ticks)
- consumption for node CPUs in irq mode (clock-ticks)
- consumption for node CPUs in softirq mode (clock-ticks)
- consumption for node CPUs in steal mode (clock-ticks)
- consumption for node CPUs in guest mode (clock-ticks) overlapping user mode
๐ CGR
For every cgroup (level) you get one or two lines, and the duality of it honestly. The first line is the utilization + configuration line for the cgroup. The optional second line is where the PIDs of the processes assigned to that cgroup show up ๐ซถ
First line fields, in order:
- character
'C' - full path name of cgroup
- number of processes assigned to this group
- number of processes assigned to the cgroups underneath
- CPU usage in user mode (microseconds)
- CPU usage in system mode (microseconds)
- CPU weight
- CPU max
- current memory usage (pages)
- anonymous memory usage (pages)
- file memory usage (pages)
- kernel memory usage (pages)
- shared memory usage (pages)
- memory max (pages)
- swap max (pages)
- number of bytes read from disk
- number of bytes written to disk
- number of read requests from disk
- number of write requests to disk
- the disk weight
- cpu some pressure (microseconds)
- cpu total pressure (microseconds)
- memory some pressure (microseconds)
- memory total pressure (microseconds)
- disk some pressure (microseconds)
- disk total pressure (microseconds)
Second line fields โ and note this line only shows up when there actually are processes assigned to this cgroup:
- character
'P' - full path name of cgroup
- list of PIDs separated by spaces
๐ PRG
One line per process, general info edition. Fields:
- PID (unique ID of task)
- name (between parenthesis or underscores for spaces)
- state
- real uid
- real gid
- TGID (group number of related tasks/threads)
- total number of threads
- exit code (in case of fatal signal: signal number + 256)
- start time (epoch)
- full command line (between parenthesis or underscores for spaces)
- PPID
- number of threads in state 'running' (R)
- number of threads in state 'interruptible sleeping' (S)
- number of threads in state 'uninterruptible sleeping' (D)
- effective uid
- effective gid
- saved uid
- saved gid
- filesystem uid
- filesystem gid
- elapsed time of terminated process (hertz)
- is_process (y/n)
- OpenVZ virtual pid (VPID)
- OpenVZ container id (CTID)
- container/pod name (CID/POD)
- indication if the task is newly started during this interval ('N')
- cgroup v2 path name (between parenthesis or underscores for spaces)
- end time (epoch or 0 if still active)
- number of threads in state 'idle' (I)
๐ฅ PRC
One line per process again, this time cpu-central โจ
- PID
- name (between parenthesis or underscores for spaces)
- state
- total number of clock-ticks per second for this machine
- CPU-consumption in user mode (clockticks)
- CPU-consumption in system mode (clockticks)
- nice value
- priority
- realtime priority
- scheduling policy
- current CPU (-1 for exited process)
- sleep average
- TGID (group number of related tasks/threads)
- is_process (y/n)
- runqueue delay in nanoseconds for this thread or for all threads (in case of process)
- wait channel of this thread (between parenthesis or underscores for spaces)
- block I/O delay (clockticks)
- cgroup v2 'cpu.max' calculated as percentage (-3 means no cgroup v2 support, -2 means undefined and -1 means maximum)
- cgroup v2 most restrictive 'cpu.max' in upper directories calculated as percentage (-3 means no cgroup v2 support, -2 means undefined and -1 means maximum)
- number of voluntary context switches
- number of involuntary context switches
๐ PRE
One line per process, but make it GPU ๐
- PID
- name (between parenthesis or underscores for spaces)
- process state
- GPU state (A for active, E for exited, N for no GPU user)
- number of GPUs used by this process
- bitlist reflecting used GPUs
- GPU busy percentage during interval
- memory busy percentage during interval
- memory occupation (KiB) at this moment cumulative memory occupation (KiB) during interval
- number of samples taken during interval
- is_process (y/n)
- type of process (C for computing, G for graphics and U for unknown)
๐ PRM
One line per process, memory girl summer ๐ง
- PID
- name (between parenthesis or underscores for spaces)
- state
- page size for this machine (in bytes)
- virtual memory size (KiB)
- resident memory size (KiB)
- shared text memory size (KiB)
- virtual memory growth (KiB)
- resident memory growth (KiB)
- number of minor page faults
- number of major page faults
- virtual library exec size (KiB)
- virtual data size (KiB)
- virtual stack size (KiB)
- swap space used (KiB)
- TGID (group number of related tasks/threads)
- is_process (y/n)
- proportional set size (KiB) if in 'R' option is specified
- virtually locked memory space (KiB)
- cgroup v2 'memory.max' in KiB (-3 means no cgroup v2 support, -2 means undefined and -1 means maximum)
- cgroup v2 most restrictive 'memory.max' in upper directories in KiB (-3 means no cgroup v2 support, -2 means undefined and -1 means maximum)
- cgroup v2 'memory.swap.max' in KiB (-3 means no cgroup v2 support, -2 means undefined and -1 means maximum)
- cgroup v2 most restrictive 'memory.swap.max' in upper directories in KiB (-3 means no cgroup v2 support, -2 means undefined and -1 means maximum)
๐ PRD
One line per process, disk-flavored ๐
- PID
- name (between parenthesis or underscores for spaces)
- state
- obsoleted kernel patch installed ('n')
- standard io statistics used ('y' or 'n')
- number of reads on disk
- cumulative number of sectors read
- number of writes on disk
- cumulative number of sectors written
- cancelled number of written sectors
- TGID (group number of related tasks/threads)
- obsoleted value ('n')
- is_process (y/n)
๐ซถ PRN
One line per process, net edition ๐ฆ
- PID
- name (between parenthesis or underscores for spaces)
- state
- kernel module netatop or netatop-bpf installed ('y' or 'n')
- number of TCP-packets transmitted
- cumulative size of TCP-packets transmitted
- number of TCP-packets received
- cumulative size of TCP-packets received
- number of UDP-packets transmitted
- cumulative size of UDP-packets transmitted
- number of UDP-packets received
- cumulative size of UDP-packets transmitted
- number of raw packets transmitted (obsolete, always 0)
- number of raw packets received (obsolete, always 0)
- TGID (group number of related tasks/threads) and is_process (y/n)
heads up bestie ๐จ If the kernel module is not active, the network I/O counters per process are not relevant.
๐ JSON OUTPUT ๐
With the flag -J followed by a list of one or more labels (comma-separated), JSON output is produced for each sample. And the syntax and name of JSON labels are the same as for the parsable output โ so like, if you know the parsable ones you already know these, iykyk ๐
๐ SIGNALS ๐
- Send
SIGUSR1to atop and a new sample gets forced, even if the current timer interval has not exceeded yet โฉ The behavior is similar to pressing thetkey in an interactive session. - Send
SIGUSR2to atop and a final sample gets forced, after which atop will terminate ๐
๐ EXAMPLES ๐
ok so here's where it gets good โ these are the actual things you'll be typing, bestie. every single one is copy-pasteable, no cap โจ
Monitor the current system load in text mode with an interval of (default) 10 seconds:
atop
Monitor the current system load as bar graphs with an interval of 5 seconds:
atop -B 5
Monitor the current system load in text mode with an interval of 4 seconds with the possibility to browse back and forth while measuring continues (twin mode):
atop -t 4
Live monitoring of the current system load while writing the measurement to a raw log in parallel (to be viewed later on):
atop -g -w /tmp/sessionx
View the cgroups with the related processes (except kernel processes) with the possibility to review previous samples during the live measurement:
atop -G8 -t
Store information about the system and process activity in binary compressed form to a file with an interval of ten minutes during an hour:
atop -w /tmp/atop.raw 600 6
View the contents of this file interactively:
atop -r /tmp/atop.raw
View the processor and disk utilization of this file in parsable format:
atop -PCPU,DSK -r /tmp/atop.raw
View the contents of today's standard logfile interactively:
atop -r
View the contents of the standard logfile of the day before yesterday interactively:
atop -r yy
View the contents of the standard logfile of 2024, November 5 from 02:00 PM onwards interactively:
atop -r 20241105 -b 1400
Read the contents of today's logfile and show the CPU utilization on system level as parseable output and JSON output:
atop -r -PCPU -JCPU
Concatenate all raw log files of November 2024 and generate parsable output about the CPU utilization:
atopcat /var/log/atop/atop_202403?? | atop -r - -PCPU
Monitor the system load and write it to a file (in plain ASCII) with an interval of one minute during half an hour with active processes sorted on memory consumption:
atop -M 60 30 > /log/atop.mem
๐ซถ ok that last one is giving "old school and proud" โ plain ASCII output redirected straight into a file. lowkey iconic.
๐ FILES ๐
these are the paths atop is gonna be poking at, so likeโฆ know them, love them ๐
/var/run/pacct_shadow.d/โ Directory containing the process accounting shadow files that are used byatopwhen theatopacctddaemon is active./var/cache/atop.d/atop.acctโ File in which the kernel writes the accounting records whenatopitself has activated the process accounting mechanism./etc/atoprcโ Configuration file containing system-wide default values. For further information about the default values, refer to theatoprcman page).~/.atoprcโ Configuration file containing personal default values. For further information about the default values, refer to theatoprcman page)./etc/default/atopโ Configuration file to overrule the settings ofatopthat runs in the background to create the daily logfile. This file is created whenatopis installed. The default settings are:
LOGOPTS=""
LOGINTERVAL=600
LOGGENERATIONS=28
/var/log/atop/atop_YYYYMMDDโ Raw file, whereYYYYMMDDare digits representing the current date. This name is used byatoprunning in the background as default name for the output file, and byatopas default name for the input file when using the-rflag. All binary system and process level data in this file has been stored in compressed format./var/run/netatop.logโ File that contains thenetpertaskstructs containing the network counters of exited processes. These structs are written by thenetatopddaemon (which is related to thenetatopmodule) and read byatopafter reading the standard process accounting records.
๐ธ btw thatLOGOPTS=""/LOGINTERVAL=600/LOGGENERATIONS=28trio is literally the mood of every background logging setup ever. 600 seconds = 10 min, and it keeps 28 generations. yes bestie, that's the whole vibe.
๐ SEE ALSO ๐
your little friend group of related tools and docs, go say hi ๐
atopsar(1), atopconvert(1), atopcat(1), atophide(1), atoprc(5), atopacctd(8), netatop(4), netatopd(8), atopgpud(8), logrotate(8)
๐ AUTHOR ๐
the legends themselves, fr fr ๐
Gerlof Langeveld (gerlof.langeveld@atoptool.nl) JC van Winkel
aaaaaaaaand that's the whole page, bestie!! ๐ฆ you made it to the very end, so proud of you fr fr. this one comes from the Linux source, version/date stamp side says June 2026, and the page itself is ATOP(1) โ go forth and monitor everything, you absolute main character ๐
โจ
๐ฆ where this page comes from
- arch rolling: atop 2.13.0-1 ยท GPL-2.0-or-later
- fedora 44: atop 2.13.0-1.fc44 ยท GPL-2.0-or-later
- nixpkgs unstable: atop 2.13.0
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms