Commit | Line | Data |
---|---|---|
ca67e7b4 C |
1 | |
2 | ||
3 | ||
1c15e888 | 4 | ACCT(5) 1986 ACCT(5) |
ca67e7b4 C |
5 | |
6 | ||
7 | ||
8 | N\bNA\bAM\bME\bE | |
9 | acct - execution accounting file | |
10 | ||
11 | S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS | |
12 | #\b#i\bin\bnc\bcl\blu\bud\bde\be <\b<s\bsy\bys\bs/\b/a\bac\bcc\bct\bt.\b.h\bh>\b> | |
13 | ||
14 | D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN | |
15 | The _\ba_\bc_\bc_\bt(2) system call arranges for entries to be made in | |
16 | an accounting file for each process that terminates. The | |
17 | accounting file is a sequence of entries whose layout, as | |
18 | defined by the include file is: | |
19 | ||
20 | /* | |
21 | * Copyright (c) 1982, 1986 Regents of the University of California. | |
22 | * All rights reserved. The Berkeley software License Agreement | |
23 | * specifies the terms and conditions for redistribution. | |
24 | * | |
1c15e888 | 25 | * @(#)acct.h 7.2 (Berkeley) 5/9/89 |
ca67e7b4 C |
26 | */ |
27 | ||
28 | /* | |
29 | * Accounting structures; | |
30 | * these use a comp_t type which is a 3 bits base 8 | |
31 | * exponent, 13 bit fraction ``floating point'' number. | |
32 | * Units are 1/AHZ seconds. | |
33 | */ | |
34 | typedef u_short comp_t; | |
35 | ||
36 | struct acct | |
37 | { | |
38 | char ac_comm[10]; /* Accounting command name */ | |
39 | comp_t ac_utime; /* Accounting user time */ | |
40 | comp_t ac_stime; /* Accounting system time */ | |
41 | comp_t ac_etime; /* Accounting elapsed time */ | |
42 | time_t ac_btime; /* Beginning time */ | |
43 | uid_t ac_uid; /* Accounting user ID */ | |
44 | gid_t ac_gid; /* Accounting group ID */ | |
45 | short ac_mem; /* average memory usage */ | |
46 | comp_t ac_io; /* number of disk IO blocks */ | |
47 | dev_t ac_tty; /* control typewriter */ | |
48 | char ac_flag; /* Accounting flag */ | |
49 | }; | |
50 | ||
51 | #define AFORK 0001 /* has executed fork, but no exec */ | |
52 | #define ASU 0002 /* used super-user privileges */ | |
53 | #define ACOMPAT 0004 /* used compatibility mode */ | |
54 | #define ACORE 0010 /* dumped core */ | |
55 | #define AXSIG 0020 /* killed by a signal */ | |
56 | ||
57 | /* | |
58 | * 1/AHZ is the granularity of the data encoded in the various | |
59 | * comp_t fields. This is not necessarily equal to hz. | |
60 | ||
61 | ||
62 | ||
1c15e888 | 63 | Printed 7/27/90 May 1 |
ca67e7b4 C |
64 | |
65 | ||
66 | ||
67 | ||
68 | ||
69 | ||
1c15e888 | 70 | ACCT(5) 1986 ACCT(5) |
ca67e7b4 C |
71 | |
72 | ||
73 | ||
74 | */ | |
75 | #define AHZ 64 | |
76 | ||
77 | #ifdef KERNEL | |
1c15e888 | 78 | struct vnode *acctp; |
ca67e7b4 C |
79 | #endif |
80 | ||
81 | If the process was created by an _\be_\bx_\be_\bc_\bv_\be(2), the first 10 | |
82 | characters of the filename appear in _\ba_\bc__\bc_\bo_\bm_\bm. The accounting | |
83 | flag contains bits indicating whether _\be_\bx_\be_\bc_\bv_\be(2) was ever | |
84 | accomplished, and whether the process ever had super-user | |
85 | privileges. | |
86 | ||
87 | S\bSE\bEE\bE A\bAL\bLS\bSO\bO | |
88 | acct(2), execve(2), sa(8) | |
89 | ||
90 | ||
91 | ||
92 | ||
93 | ||
94 | ||
95 | ||
96 | ||
97 | ||
98 | ||
99 | ||
100 | ||
101 | ||
102 | ||
103 | ||
104 | ||
105 | ||
106 | ||
107 | ||
108 | ||
109 | ||
110 | ||
111 | ||
112 | ||
113 | ||
114 | ||
115 | ||
116 | ||
117 | ||
118 | ||
119 | ||
120 | ||
121 | ||
122 | ||
123 | ||
124 | ||
125 | ||
126 | ||
127 | ||
1c15e888 C |
128 | |
129 | Printed 7/27/90 May 2 | |
ca67e7b4 C |
130 | |
131 | ||
132 |