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. Neither the name of the University nor the names of its contributors
13 .\" may be used to endorse or promote products derived from this software
14 .\" without specific prior written permission.
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .\" @(#)acct.5 8.1 (Berkeley) 6/5/93
29 .\" $FreeBSD: src/share/man/man5/acct.5,v 1.7.2.2 2001/12/17 11:30:13 ru Exp $
30 .\" $DragonFly: src/share/man/man5/acct.5,v 1.3 2007/11/23 23:03:57 swildner Exp $
37 .Nd execution accounting file
42 The kernel maintains the following
44 information structure for all
46 If a process terminates, and accounting is enabled,
49 function call to prepare and append the record
50 to the accounting file.
53 * Accounting structures; these use a comp_t type which is a 3 bits base 8
54 * exponent, 13 bit fraction ``floating point'' number. Units are 1/AHZ
57 typedef u_short comp_t;
59 #define AC_COMM_LEN 16
61 char ac_comm[AC_COMM_LEN]; /* command name */
62 comp_t ac_utime; /* user time */
63 comp_t ac_stime; /* system time */
64 comp_t ac_etime; /* elapsed time */
65 time_t ac_btime; /* starting time */
66 uid_t ac_uid; /* user id */
67 gid_t ac_gid; /* group id */
68 short ac_mem; /* average memory usage */
69 comp_t ac_io; /* count of IO blocks */
70 dev_t ac_tty; /* controlling tty */
71 #define AFORK 0x01 /* forked but not exec'ed */
72 #define ASU 0x02 /* used super-user permissions */
73 #define ACOMPAT 0x04 /* used compatibility mode */
74 #define ACORE 0x08 /* dumped core */
75 #define AXSIG 0x10 /* killed by a signal */
76 char ac_flag; /* accounting flags */
80 * 1/AHZ is the granularity of the data encoded in the comp_t fields.
81 * This is not necessarily equal to hz.
86 If a terminated process was created by an
88 the name of the executed file (at most ten characters of it)
91 and its status is saved by setting one of more of the following flags in
106 file format appeared in