1ACCT(2) System Calls Manual ACCT(2)
2
3
4
6 acct - turn accounting on or off
7
9 acct(file)
10 char *file;
11
13 The system is prepared to write a record in an accounting file for each
14 process as it terminates. This call, with a null-terminated string
15 naming an existing file as argument, turns on accounting; records for
16 each terminating process are appended to file. An argument of 0 causes
17 accounting to be turned off.
18
19 The accounting file format is given in acct(5).
20
21 This call is permitted only to the super-user.
22
24 Accounting is automatically disabled when the file system the account‐
25 ing file resides on runs out of space; it is enabled when space once
26 again becomes available.
27
29 On error -1 is returned. The file must exist and the call may be exer‐
30 cised only by the super-user. It is erroneous to try to turn on
31 accounting when it is already on.
32
34 Acct will fail if one of the following is true:
35
36 [EPERM] The caller is not the super-user.
37
38 [ENOTDIR] A component of the path prefix is not a directory.
39
40 [EINVAL] The pathname contains a character with the high-order
41 bit set.
42
43 [ENAMETOOLONG] A component of a pathname exceeded 255 characters, or an
44 entire path name exceeded 1023 characters.
45
46 [ENOENT] The named file does not exist.
47
48 [EACCES] Search permission is denied for a component of the path
49 prefix, or the path name is not a regular file.
50
51 [ELOOP] Too many symbolic links were encountered in translating
52 the pathname.
53
54 [EROFS] The named file resides on a read-only file system.
55
56 [EFAULT] File points outside the process's allocated address
57 space.
58
59 [EIO] An I/O error occurred while reading from or writing to
60 the file system.
61
63 acct(5), sa(8)
64
66 No accounting is produced for programs running when a crash occurs. In
67 particular non-terminating programs are never accounted for.
68
69
70
714th Berkeley Distribution May 22, 1986 ACCT(2)