2 * BSD Process Accounting for Linux - Definitions
4 * Author: Marco van Wieringen (mvw@planets.elm.net)
6 * This header file contains the definitions needed to implement
7 * BSD-style process accounting. The kernel accounting code and all
8 * user-level programs that try to do something useful with the
9 * process accounting log must include this file.
11 * Copyright (C) 1995 - 1997 Marco van Wieringen - ELM Consultancy B.V.
18 #include <linux/types.h>
21 * comp_t is a 16-bit "floating" point number with a 3-bit base 8
22 * exponent and a 13-bit fraction. See linux/kernel/acct.c for the
23 * specific encoding system used.
29 * accounting file record
31 * This structure contains all of the information written out to the
32 * process accounting file whenever a process exits.
39 char ac_flag; /* Accounting Flags */
41 * No binary format break with 2.0 - but when we hit 32bit uid we'll
44 __u16 ac_uid; /* Accounting Real User ID */
45 __u16 ac_gid; /* Accounting Real Group ID */
46 __u16 ac_tty; /* Accounting Control Terminal */
47 __u32 ac_btime; /* Accounting Process Creation Time */
48 comp_t ac_utime; /* Accounting User Time */
49 comp_t ac_stime; /* Accounting System Time */
50 comp_t ac_etime; /* Accounting Elapsed Time */
51 comp_t ac_mem; /* Accounting Average Memory Usage */
52 comp_t ac_io; /* Accounting Chars Transferred */
53 comp_t ac_rw; /* Accounting Blocks Read or Written */
54 comp_t ac_minflt; /* Accounting Minor Pagefaults */
55 comp_t ac_majflt; /* Accounting Major Pagefaults */
56 comp_t ac_swaps; /* Accounting Number of Swaps */
57 __u32 ac_exitcode; /* Accounting Exitcode */
58 char ac_comm[ACCT_COMM + 1]; /* Accounting Command Name */
59 char ac_pad[10]; /* Accounting Padding Bytes */
65 /* bit set when the process ... */
66 #define AFORK 0x01 /* ... executed fork, but did not exec */
67 #define ASU 0x02 /* ... used super-user privileges */
68 #define ACOMPAT 0x04 /* ... used compatibility mode (VAX only not used) */
69 #define ACORE 0x08 /* ... dumped core */
70 #define AXSIG 0x10 /* ... was killed by a signal */
76 #include <linux/config.h>
78 #ifdef CONFIG_BSD_PROCESS_ACCT
80 extern void acct_auto_close(struct super_block *sb);
81 extern void acct_process(long exitcode);
83 #define acct_auto_close(x) do { } while (0)
84 #define acct_process(x) do { } while (0)
89 #endif /* _LINUX_ACCT_H */