atop  2.7.1
About: ATOP is an advanced interactive monitor for Linux-systems to view the load on system-level and process-level.
  Fossies Dox: atop-2.7.1.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

atop Documentation

Some Fossies usage hints in advance:

  1. To see the Doxygen generated documentation please click on one of the items in the steelblue colored "quick index" bar above or use the side panel at the left which displays a hierarchical tree-like index structure and is adjustable in width.
  2. If you want to search for something by keyword rather than browse for it you can use the client side search facility (using Javascript and DHTML) that provides live searching, i.e. the search results are presented and adapted as you type in the Search input field at the top right.
  3. Doxygen doesn't incorporate all member files but just a definable subset (basically the main project source code files that are written in a supported language). So to search and browse all member files you may visit the Fossies atop-2.7.1.tar.gz contents page and use the Fossies standard member browsing features (also with source code highlighting and additionally with optional code folding).
For all files that are not marked differently:

Copyright Gerlof Langeveld 2007-2021 and licensed under the GPL v2 (or any later version).


Install the following packages to be able to build atop (package name
can be different depending on the Linux distro):

* zlib-devel    or libz-dev or zlib1g-dev
* ncurses-devel or libncurses5-dev/libncursesw5-dev

Install the following packages to be able to execute atop (package name
can be different depending on the Linux distro):

* zlib    or zlib1g
* ncurses or libncurses5/libncursesw5


For interactive use, it is sufficient to install ATOP with the command
(as root):

	make install		(systemd based)


	make sysvinstall	(System V init based)

For automatic logging in compressed binary format, see the
description in the manual-page.

The kernel module 'netatop' can be downloaded and installed separately
This module is optional and can be used to gather network statistics
per process/thread as described in

Preferably, process accounting should be handled by the atopacctd daemon
which is implicitly installed when installing atop. This daemon takes
care that process accounting is only active when at least one atop
process is running. Besides, when process accounting is activated,
atopacctd takes care that the disk utilization is minimal.
See the man page of atopacctd for further details.

When the psacct or acct package is installed in parallel with the
atop package and you want to enable/start the (ps)acct service for
permanent process accounting, take care that the atopacct will be
disabled. The atopacct service and the (ps)acct service mutually
exclude one another.
When the (ps)acct service is enabled, atop automatically uses the
process accounting file that is used by this package.
See also the section PROCESS ACCOUNTING in the man page of atop.


Newer upstream kernels (e.g. 4.8 and 4.9) have two issuess
with process accounting:

1) Sometimes process accounting does not work at allĀ¹. Atopacctd tries to
work around this issue, by retrying to initialize process accounting
several times.

2) When using the NETLINK inface, the command TASKSTATS_CMD_GET
consequently returns -EINVALĀ². Atopacctd needs NETLINK to be able to
be triggered that some process in the system has finished. In this way,
atopacctd can be in a blocking state as long as no processes terminate.
When atopacctd detects that NETLINK fails, it switches into a polling
mode to periodically try if it can read process accounting records as
a workaround. This issue has to do with cpumasks and you can work-around
it by building a kernel that has CONFIG_NR_CPUS configured to exactly
the amount of CPUs (logical CPUs) in the system the kernel runs on. You
can find this kernel option under "Processor type and features" -->
"Maximum number of CPUs".

[1] Bug 190271 - process accounting sometimes does not work

[2] Bug 190711 - Process accounting: Using the NETLINK interface,
the command TASKSTATS_CMD_GET returns -EINVAL

Linux kernel mailing list thread:

[REGRESSION] Two issues that prevent process accounting (taskstats) from
working correctly


After the package has been installed, be sure that the related services
are activated.
To support handling of terminated processes using process accounting,
enable the atopacct service:

	systemctl enable --now atopacct

Notice that this service should not be enabled when the package
psacct or acct (depends on the Linux distribution) has been installed
and enabled. In that case atop uses the daily process accounting file
created via that package.

To support maintaining daily log files to keep track of long-term analysis
information, enable the atop service and the related timer:

	systemctl enable --now atop
	systemctl enable --now atop-rotate.timer

Gerlof Langeveld