diff options
Diffstat (limited to 'include/linux/acct.h')
| -rw-r--r-- | include/linux/acct.h | 108 |
1 files changed, 1 insertions, 107 deletions
diff --git a/include/linux/acct.h b/include/linux/acct.h index d537aa0ec414..4a5b7cb56079 100644 --- a/include/linux/acct.h +++ b/include/linux/acct.h | |||
| @@ -11,109 +11,11 @@ | |||
| 11 | * Copyright (C) 1995 - 1997 Marco van Wieringen - ELM Consultancy B.V. | 11 | * Copyright (C) 1995 - 1997 Marco van Wieringen - ELM Consultancy B.V. |
| 12 | * | 12 | * |
| 13 | */ | 13 | */ |
| 14 | |||
| 15 | #ifndef _LINUX_ACCT_H | 14 | #ifndef _LINUX_ACCT_H |
| 16 | #define _LINUX_ACCT_H | 15 | #define _LINUX_ACCT_H |
| 17 | 16 | ||
| 18 | #include <linux/types.h> | 17 | #include <uapi/linux/acct.h> |
| 19 | |||
| 20 | #include <asm/param.h> | ||
| 21 | #include <asm/byteorder.h> | ||
| 22 | |||
| 23 | /* | ||
| 24 | * comp_t is a 16-bit "floating" point number with a 3-bit base 8 | ||
| 25 | * exponent and a 13-bit fraction. | ||
| 26 | * comp2_t is 24-bit with 5-bit base 2 exponent and 20 bit fraction | ||
| 27 | * (leading 1 not stored). | ||
| 28 | * See linux/kernel/acct.c for the specific encoding systems used. | ||
| 29 | */ | ||
| 30 | |||
| 31 | typedef __u16 comp_t; | ||
| 32 | typedef __u32 comp2_t; | ||
| 33 | |||
| 34 | /* | ||
| 35 | * accounting file record | ||
| 36 | * | ||
| 37 | * This structure contains all of the information written out to the | ||
| 38 | * process accounting file whenever a process exits. | ||
| 39 | */ | ||
| 40 | 18 | ||
| 41 | #define ACCT_COMM 16 | ||
| 42 | |||
| 43 | struct acct | ||
| 44 | { | ||
| 45 | char ac_flag; /* Flags */ | ||
| 46 | char ac_version; /* Always set to ACCT_VERSION */ | ||
| 47 | /* for binary compatibility back until 2.0 */ | ||
| 48 | __u16 ac_uid16; /* LSB of Real User ID */ | ||
| 49 | __u16 ac_gid16; /* LSB of Real Group ID */ | ||
| 50 | __u16 ac_tty; /* Control Terminal */ | ||
| 51 | __u32 ac_btime; /* Process Creation Time */ | ||
| 52 | comp_t ac_utime; /* User Time */ | ||
| 53 | comp_t ac_stime; /* System Time */ | ||
| 54 | comp_t ac_etime; /* Elapsed Time */ | ||
| 55 | comp_t ac_mem; /* Average Memory Usage */ | ||
| 56 | comp_t ac_io; /* Chars Transferred */ | ||
| 57 | comp_t ac_rw; /* Blocks Read or Written */ | ||
| 58 | comp_t ac_minflt; /* Minor Pagefaults */ | ||
| 59 | comp_t ac_majflt; /* Major Pagefaults */ | ||
| 60 | comp_t ac_swaps; /* Number of Swaps */ | ||
| 61 | /* m68k had no padding here. */ | ||
| 62 | #if !defined(CONFIG_M68K) || !defined(__KERNEL__) | ||
| 63 | __u16 ac_ahz; /* AHZ */ | ||
| 64 | #endif | ||
| 65 | __u32 ac_exitcode; /* Exitcode */ | ||
| 66 | char ac_comm[ACCT_COMM + 1]; /* Command Name */ | ||
| 67 | __u8 ac_etime_hi; /* Elapsed Time MSB */ | ||
| 68 | __u16 ac_etime_lo; /* Elapsed Time LSB */ | ||
| 69 | __u32 ac_uid; /* Real User ID */ | ||
| 70 | __u32 ac_gid; /* Real Group ID */ | ||
| 71 | }; | ||
| 72 | |||
| 73 | struct acct_v3 | ||
| 74 | { | ||
| 75 | char ac_flag; /* Flags */ | ||
| 76 | char ac_version; /* Always set to ACCT_VERSION */ | ||
| 77 | __u16 ac_tty; /* Control Terminal */ | ||
| 78 | __u32 ac_exitcode; /* Exitcode */ | ||
| 79 | __u32 ac_uid; /* Real User ID */ | ||
| 80 | __u32 ac_gid; /* Real Group ID */ | ||
| 81 | __u32 ac_pid; /* Process ID */ | ||
| 82 | __u32 ac_ppid; /* Parent Process ID */ | ||
| 83 | __u32 ac_btime; /* Process Creation Time */ | ||
| 84 | #ifdef __KERNEL__ | ||
| 85 | __u32 ac_etime; /* Elapsed Time */ | ||
| 86 | #else | ||
| 87 | float ac_etime; /* Elapsed Time */ | ||
| 88 | #endif | ||
| 89 | comp_t ac_utime; /* User Time */ | ||
| 90 | comp_t ac_stime; /* System Time */ | ||
| 91 | comp_t ac_mem; /* Average Memory Usage */ | ||
| 92 | comp_t ac_io; /* Chars Transferred */ | ||
| 93 | comp_t ac_rw; /* Blocks Read or Written */ | ||
| 94 | comp_t ac_minflt; /* Minor Pagefaults */ | ||
| 95 | comp_t ac_majflt; /* Major Pagefaults */ | ||
| 96 | comp_t ac_swaps; /* Number of Swaps */ | ||
| 97 | char ac_comm[ACCT_COMM]; /* Command Name */ | ||
| 98 | }; | ||
| 99 | |||
| 100 | /* | ||
| 101 | * accounting flags | ||
| 102 | */ | ||
| 103 | /* bit set when the process ... */ | ||
| 104 | #define AFORK 0x01 /* ... executed fork, but did not exec */ | ||
| 105 | #define ASU 0x02 /* ... used super-user privileges */ | ||
| 106 | #define ACOMPAT 0x04 /* ... used compatibility mode (VAX only not used) */ | ||
| 107 | #define ACORE 0x08 /* ... dumped core */ | ||
| 108 | #define AXSIG 0x10 /* ... was killed by a signal */ | ||
| 109 | |||
| 110 | #ifdef __BIG_ENDIAN | ||
| 111 | #define ACCT_BYTEORDER 0x80 /* accounting file is big endian */ | ||
| 112 | #else | ||
| 113 | #define ACCT_BYTEORDER 0x00 /* accounting file is little endian */ | ||
| 114 | #endif | ||
| 115 | |||
| 116 | #ifdef __KERNEL__ | ||
| 117 | 19 | ||
| 118 | 20 | ||
| 119 | #ifdef CONFIG_BSD_PROCESS_ACCT | 21 | #ifdef CONFIG_BSD_PROCESS_ACCT |
| @@ -163,12 +65,6 @@ typedef struct acct_v3 acct_t; | |||
| 163 | typedef struct acct acct_t; | 65 | typedef struct acct acct_t; |
| 164 | #endif | 66 | #endif |
| 165 | 67 | ||
| 166 | #else | ||
| 167 | #define ACCT_VERSION 2 | ||
| 168 | #define AHZ (HZ) | ||
| 169 | #endif /* __KERNEL */ | ||
| 170 | |||
| 171 | #ifdef __KERNEL__ | ||
| 172 | #include <linux/jiffies.h> | 68 | #include <linux/jiffies.h> |
| 173 | /* | 69 | /* |
| 174 | * Yet another set of HZ to *HZ helper functions. | 70 | * Yet another set of HZ to *HZ helper functions. |
| @@ -210,6 +106,4 @@ static inline u64 nsec_to_AHZ(u64 x) | |||
| 210 | return x; | 106 | return x; |
| 211 | } | 107 | } |
| 212 | 108 | ||
| 213 | #endif /* __KERNEL */ | ||
| 214 | |||
| 215 | #endif /* _LINUX_ACCT_H */ | 109 | #endif /* _LINUX_ACCT_H */ |
