Kernel patches
When
atop is used on a system running a standard Linux-kernel,
no information is available about the disk- and network-accesses issued
per process. This means a.o. that the selection 'd' (show disk-transfers
per process) and 'n' (show network-transfers per process) can not be used,
and that the columns shown in the generic screen are different.
For extended use of atop two kernel-patches are delivered,
to be used from atop version 1.14 onwards.
Patch 1: 01patch-kernelversion-atopcnt
This patch takes care that statistical counters are added
to the process-administration (task_struct) and that these
counters are incremented per process.
The additional counters are shown via the file
/proc/pid/stat as a second line of counters.
The meaning of these counters:
- disk read transfers
- disk accumulated number of sectors read
- disk write transfers
- disk accumulated number of sectors written
- tcp send requests
- tcp accumulated number of bytes transmitted
- tcp receive requests
- tcp accumulated number of bytes received
- udp send requests
- udp accumulated number of bytes transmitted
- udp receive requests
- udp accumulated number of bytes received
- raw send requests (e.g. echo requests by ping)
- raw receive requests
When this patch is installed, atop automatically
shows another layout for the generic screen (including disk-
and network-transfers for active processes). However for
terminated process these additional counters are not shown,
because the conventional layout of the process-accounting
record has not been adapted.
Patch 2: 02patch-kernelversion-atopacct
This patch takes care that the additional statistical counters are
added to the process-accounting record (yes, this means an incompatible
layout of this record).
Notice that this patch is an extension of the patch
01patch-kernelversion-atopcnt, i.e. it can not be installed on its own.
When this patch is installed, atop automatically shows
the additional counters for terminated processes as well.
Since the pid of processes is also stored in the modified
process-accounting record, matching this info with the
formerly running process is less time-consuming compared to
the conventional process-accounting record.
Install kernel patches
After the archive with patches has been
downloaded and extracted,
the following steps are required to install these patches:
- Take care that the kernel sources are installed (e.g. as
a subdirectory of /usr/src). The kernel sources in this new
subdirectory will be modified with the patch(es).
- Go to the subdirectory with new kernel sources (e.g. called
linux-2.6.31.12) and start the command to patch the tree.
Example (install both patches):
patch -p1 < /tmp/atoppatch-kernel-2.6.31/01patch-2.6.31_atopcnt
patch -p1 < /tmp/atoppatch-kernel-2.6.31/02patch-2.6.31_atopacct
- Build a new kernel and reboot.
Disclaimer:
The authors deny any warranty for any data loss and
damage whatsoever that may be caused directly or indirectly
by using this software.
This is experimental software. Use at your own risk.