1 /* Copyright (C) 1996-2016 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
21 #include <sys/types.h>
32 comp_t is a 16-bit "floating" point number with a 3-bit base 8
33 exponent and a 13-bit fraction. See linux/kernel/acct.c for the
34 specific encoding system used.
37 typedef uint16_t comp_t
;
41 char ac_flag
; /* Flags. */
42 uint16_t ac_uid
; /* Real user ID. */
43 uint16_t ac_gid
; /* Real group ID. */
44 uint16_t ac_tty
; /* Controlling terminal. */
45 uint32_t ac_btime
; /* Beginning time. */
46 comp_t ac_utime
; /* User time. */
47 comp_t ac_stime
; /* System time. */
48 comp_t ac_etime
; /* Elapsed time. */
49 comp_t ac_mem
; /* Average memory usage. */
50 comp_t ac_io
; /* Chars transferred. */
51 comp_t ac_rw
; /* Blocks read or written. */
52 comp_t ac_minflt
; /* Minor pagefaults. */
53 comp_t ac_majflt
; /* Major pagefaults. */
54 comp_t ac_swaps
; /* Number of swaps. */
55 uint32_t ac_exitcode
; /* Process exitcode. */
56 char ac_comm
[ACCT_COMM
+1]; /* Command name. */
57 char ac_pad
[10]; /* Padding bytes. */
63 char ac_flag
; /* Flags */
64 char ac_version
; /* Always set to ACCT_VERSION */
65 uint16_t ac_tty
; /* Control Terminal */
66 uint32_t ac_exitcode
; /* Exitcode */
67 uint32_t ac_uid
; /* Real User ID */
68 uint32_t ac_gid
; /* Real Group ID */
69 uint32_t ac_pid
; /* Process ID */
70 uint32_t ac_ppid
; /* Parent Process ID */
71 uint32_t ac_btime
; /* Process Creation Time */
72 float ac_etime
; /* Elapsed Time */
73 comp_t ac_utime
; /* User Time */
74 comp_t ac_stime
; /* System Time */
75 comp_t ac_mem
; /* Average Memory Usage */
76 comp_t ac_io
; /* Chars Transferred */
77 comp_t ac_rw
; /* Blocks Read or Written */
78 comp_t ac_minflt
; /* Minor Pagefaults */
79 comp_t ac_majflt
; /* Major Pagefaults */
80 comp_t ac_swaps
; /* Number of Swaps */
81 char ac_comm
[ACCT_COMM
]; /* Command Name */
87 AFORK
= 0x01, /* Has executed fork, but no exec. */
88 ASU
= 0x02, /* Used super-user privileges. */
89 ACORE
= 0x08, /* Dumped core. */
90 AXSIG
= 0x10 /* Killed by a signal. */
93 #if __BYTE_ORDER == __BIG_ENDIAN
94 # define ACCT_BYTEORDER 0x80 /* Accounting file is big endian. */
96 # define ACCT_BYTEORDER 0x00 /* Accounting file is little endian. */
102 /* Switch process accounting on and off. */
103 extern int acct (const char *__filename
) __THROW
;
107 #endif /* sys/acct.h */