aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorTim Schmielau <tim@physik3.uni-rostock.de>2004-06-17 18:01:23 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-06-17 18:01:23 -0700
commitf38928f424ef877fb2f1133a9318595178291b4b (patch)
treee0323f19469ea0a91513cf12ce966e5fcd8e921c /init
parente1cb4984e6be1598edf830c49e7b7777233c7934 (diff)
downloadhistory-f38928f424ef877fb2f1133a9318595178291b4b.tar.gz
[PATCH] BSD accounting format rework
BSD accounting format rework: Use all explicit and implicit padding in struct acct to - correctly report 32 bit uid/gid, - correctly report jobs (e.g., daemons) running longer than 497 days, - increase the precision of ac_etime from 2^-13 to 2^-20 (i.e., from ~6 hours to ~1 min. after a year) - store the current AHZ value. - allow cross-platform processing of the accounting file (limited for m68k which has a different size struct acct). - introduce versioning for smooth transition to incompatible formats in the future. Currently the following version numbers are defined: 0: old format (until 2.6.7) with 16 bit uid/gid 1: extended variant (binary compatible to v0 on M68K) 2: extended variant (binary compatible to v0 on everything except M68K) 3: a new binary incompatible format (64 bytes) 4: new binary incompatible format (128 bytes). layout of its first 64 bytes is the same as for v3. 5: marks second half of new binary incompatible format (128 bytes) (layout is not yet defined) All this is accomplished without breaking binary compatibility. 32 bit uid/gid support is compatible with the patch previously floating around and used e.g. by Red Hat. This patch also introduces a config option for a new, binary incompatible "version 3" format that - is uniform across and properly aligned on all platforms - stores pid and ppid - uses AHZ==100 on all platforms (allows to report longer times) Much of the compatibility glue goes away when v1/v2 support is removed from the kernel. Such a patch is at http://www.physik3.uni-rostock.de/tim/kernel/2.7/acct-cleanup-04.patch and might be applied in the 2.7 timeframe. The new v3 format is source compatible with current GNU acct tools (6.3.5). However, current GNU acct tools can be compiled for only one format. As there is no way to pass the kernel configuration to userspace, with my patch it will still only support the old v2 format. Only if v1/v2 support is removed from the kernel, recompiling GNU acct tools will yield v3 support. A preliminary take at the corresponding work on cross-platform userspace tools (GNU acct package) is at http://www.physik3.uni-rostock.de/tim/kernel/utils/acct/ This version of the package is able to read any of the v0/v2/v3 formats, regardless of byte-order (untested), even within the same file. Cross-platform compatibility with m68k (v1 format) is not yet implemented, but native use on m68k should work (untested). pid and ppid are currently only shown by the dump-acct utility. Thanks to Arthur Corliss, Albert Cahalan and Ragnar Kjørstad for their comments, and to Albert Cahalan for the u64->IEEE float conversion code. Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig12
1 files changed, 12 insertions, 0 deletions
diff --git a/init/Kconfig b/init/Kconfig
index 210ca2cb7e129f..9b727727bcb114 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -121,6 +121,18 @@ 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.
+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
+ 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://http://www.de.kernel.org/pub/linux/utils/acct/>.
+
config SYSCTL
bool "Sysctl support"
---help---