1 .\" $NetBSD: acct.5,v 1.8 2003/08/07 10:31:16 agc Exp $
3 .\" Copyright (c) 1991, 1993
4 .\" The Regents of the University of California. All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
14 .\" 3. Neither the name of the University nor the names of its contributors
15 .\" may be used to endorse or promote products derived from this software
16 .\" without specific prior written permission.
18 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" @(#)acct.5 8.1 (Berkeley) 6/5/93
37 .Nd execution accounting file
41 The kernel maintains the following
43 information structure for all
44 processes. If a process terminates, and accounting is enabled,
47 function call to prepare and append the record
48 to the accounting file.
51 * Accounting structures; these use a comp_t type which is a 3 bits base 8
52 * exponent, 13 bit fraction ``floating point'' number. Units are 1/AHZ
55 typedef u_short comp_t;
58 char ac_comm[10]; /* name of command */
59 comp_t ac_utime; /* user time */
60 comp_t ac_stime; /* system time */
61 comp_t ac_etime; /* elapsed time */
62 time_t ac_btime; /* starting time */
63 uid_t ac_uid; /* user id */
64 gid_t ac_gid; /* group id */
65 short ac_mem; /* memory usage average */
66 comp_t ac_io; /* count of IO blocks */
67 dev_t ac_tty; /* controlling tty */
68 #define AFORK 0x01 /* forked but not execed */
69 #define ASU 0x02 /* used super-user permissions */
70 #define ACOMPAT 0x04 /* used compatibility mode */
71 #define ACORE 0x08 /* dumped core */
72 #define AXSIG 0x10 /* killed by a signal */
73 char ac_flag; /* accounting flags */
77 * 1/AHZ is the granularity of the data encoded in the comp_t fields.
78 * This is not necessarily equal to hz.
87 If a terminated process was created by an
89 the name of the executed file (at most ten characters of it)
92 and its status is saved by setting one of more of the following flags in
103 flags are no longer recorded by the system, but are retained for source
114 file format appeared in