[PATCH 3/3] accounting: task counters for disk/network

From: Gerlof Langeveld
Date: Wed Apr 02 2008 - 04:06:09 EST



From: Gerlof Langeveld <gerlof@xxxxxxxxxxxxxx>

This patch depends on patch 2/3 "accounting: task counters for disk/network".

Kernel configuration should allow the selection of the required
type of process accounting record (new type 6). The standard type
of process accounting record remains the default.

Furthermore per-task I/O accounting (i.e. the availability of the
file /proc/pid/io) is made independent of the export of these
statistics through netlink. The current structure of the ifdef's
allows this independency.

Modified file
init/Kconfig: When process accounting support is configured,
a choice can be made between type 2 (default),
type 3 (was already an existing alternative)
or type 6 (new alternative).

Task I/O accounting is no longer depending on
extended taskstats through netlink interface.

Signed-off-by: Gerlof Langeveld <gerlof@xxxxxxxxxxxxxx>
---

diff -uprN -X linux-2.6.24.4-modified/Documentation/dontdiff linux-2.6.24.4-vanilla/init/Kconfig linux-2.6.24.4-modified/init/Kconfig
--- linux-2.6.24.4-vanilla/init/Kconfig 2008-03-24 19:49:18.000000000 +0100
+++ linux-2.6.24.4-modified/init/Kconfig 2008-03-27 09:49:39.000000000 +0100
@@ -152,18 +152,37 @@ config BSD_PROCESS_ACCT
up to the user level program to do useful things with this
information. This is generally a good idea, so say Y.

+choice
+ depends on BSD_PROCESS_ACCT
+ prompt "Accounting record type"
+ default BSD_PROCESS_ACCT_V2
+
+config BSD_PROCESS_ACCT_V2
+ bool "BSD Process Accounting version 2 file format"
+ help
+ Default format with limited process accounting information.
+
config BSD_PROCESS_ACCT_V3
bool "BSD Process Accounting version 3 file format"
- depends on BSD_PROCESS_ACCT
- default n
help
- If you say Y here, the process accounting information is written
+ The process accounting information is written
in a new file format that also logs the process IDs of each
process and it's parent. Note that this file format is incompatible
with previous v0/v1/v2 file formats, so you will need updated tools
for processing it. A preliminary version of these tools is available
at <http://www.physik3.uni-rostock.de/tim/kernel/utils/acct/>.

+config PROCESS_ACCT_V6
+ bool "Process Accounting version 6 file format"
+ help
+ The process accounting information is written
+ in a file format that logs the PID of each process and
+ additional I/O statistics for disk and networking.
+ Note that this file format is incompatible
+ with previous v0/v1/v2/v3 file formats, but supplies optimal
+ information for tools like atop.
+endchoice
+
config TASKSTATS
bool "Export task/process statistics through netlink (EXPERIMENTAL)"
depends on NET
@@ -198,11 +217,10 @@ config TASK_XACCT
Say N if unsure.

config TASK_IO_ACCOUNTING
- bool "Enable per-task storage I/O accounting (EXPERIMENTAL)"
- depends on TASK_XACCT
+ bool "Enable per-task I/O accounting (EXPERIMENTAL)"
help
- Collect information on the number of bytes of storage I/O which this
- task has caused.
+ Collect information on disk and network I/O which this task
+ has caused.

Say N if unsure.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/