1 .\" Copyright (c) 1991, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\" must display the following acknowledgement:
14 .\" This product includes software developed by the University of
15 .\" California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" @(#)acct.5 8.1 (Berkeley) 6/5/93
40 .Nd execution accounting file
45 The kernel maintains the following
47 information structure for all
49 If a process terminates, and accounting is enabled,
52 function call to prepare and append the record
53 to the accounting file.
55 #define AC_COMM_LEN 16
58 * Accounting structure version 2 (current).
59 * The first byte is always zero.
60 * Time units are microseconds.
64 uint8_t ac_zero; /* zero identifies new version */
65 uint8_t ac_version; /* record version number */
66 uint16_t ac_len; /* record length */
68 char ac_comm[AC_COMM_LEN]; /* command name */
69 float ac_utime; /* user time */
70 float ac_stime; /* system time */
71 float ac_etime; /* elapsed time */
72 time_t ac_btime; /* starting time */
73 uid_t ac_uid; /* user id */
74 gid_t ac_gid; /* group id */
75 float ac_mem; /* average memory usage */
76 float ac_io; /* count of IO blocks */
77 __dev_t ac_tty; /* controlling tty */
79 uint16_t ac_len2; /* record length */
81 __dev_t ac_align; /* force v1 compatible alignment */
83 #define AFORK 0x01 /* forked but not exec'ed */
84 /* ASU is no longer supported */
85 #define ASU 0x02 /* used super-user permissions */
86 #define ACOMPAT 0x04 /* used compatibility mode */
87 #define ACORE 0x08 /* dumped core */
88 #define AXSIG 0x10 /* killed by a signal */
89 #define ANVER 0x20 /* new record version */
91 uint8_t ac_flag; /* accounting flags */
94 #define ac_flagx ac_trailer.ac_flag
98 If a terminated process was created by an
100 the name of the executed file (at most ten characters of it)
101 is saved in the field
103 and its status is saved by setting one of more of the following flags in
111 is no longer supported.
113 is always set in the above structure.
122 file format appeared in
124 The current record format was introduced on May 2007.
125 It is backwards compatible with the previous format,
126 which is still documented in