diff options
| author | Jacob McDonnell <jacob@jacobmcdonnell.com> | 2026-04-25 21:07:28 -0400 |
|---|---|---|
| committer | Jacob McDonnell <jacob@jacobmcdonnell.com> | 2026-04-25 21:07:28 -0400 |
| commit | 711594636704defae873be1a355a292505585afd (patch) | |
| tree | 59ee13f863830d8beba6cfd02bbe813dd486c26f /static/v10/man5/acct.5 | |
| parent | 3258a063c1f189d7b019e40e525b46bef9b9a7b1 (diff) | |
docs: Added UNIX V10 Manuals
Diffstat (limited to 'static/v10/man5/acct.5')
| -rw-r--r-- | static/v10/man5/acct.5 | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/static/v10/man5/acct.5 b/static/v10/man5/acct.5 new file mode 100644 index 00000000..6abf06da --- /dev/null +++ b/static/v10/man5/acct.5 @@ -0,0 +1,63 @@ +.TH ACCT 5 +.CT 1 sa_nonmortals +.SH NAME +acct \- execution accounting file +.SH SYNOPSIS +.B #include <sys/types.h> +.br +.B #include <sys/acct.h> +.SH DESCRIPTION +.IR Acct (2) +causes an entry to be appended to an accounting file +for each process that terminates. +The layout of an accounting file entry, as given in +.BR <sys/acct.h> , +is +.PP +.EX +.ta \w'typedef 'u +\w'ASTINY 'u +\w'ac_comm[10]; 'u +typedef unsigned short comp_t; + +struct acct +{ + char ac_comm[10]; /* command name */ + comp_t ac_utime; /* user time */ + comp_t ac_stime; /* system time */ + comp_t ac_etime; /* elapsed time */ + time_t ac_btime; /* beginning time */ + short ac_uid; /* user ID */ + short ac_gid; /* group ID */ + short ac_mem; /* average memory usage */ + comp_t ac_io; /* number of disk IO blocks */ + dev_t ac_tty; /* control typewriter */ + char ac_flag; /* flag */ +}; +.EE +.PP +Values in +.BR ac_flag : +.PP +.EX +#define AFORK 01 /* has executed fork, but no exec */ +#define ASU 02 /* used super-user privileges */ +.EE +.PP +If the process does an +.IR exec (2), +the first 10 characters of the filename appear in +.L ac_comm. +.PP +The type +.B comp_t +counts 60- or 50-cycle clock ticks in a private +floating-point format: a +three-bit base-8 exponent and a 13-bit unsigned mantissa. +Thus the number of clock ticks that a process ran is expressed by +.IR (ac_etime&017777)\^<<\^((ac_etime>>13)&03) . +The beginning time, +.BR ac_btime , +is recorded in the format of +.IR time (2). +.SH SEE ALSO +.IR acct (2), +.IR sa (8) |
