ACCT(5-BSD) RISC/os Reference Manual ACCT(5-BSD)
NAME
acct - execution accounting file
SYNOPSIS
#include <sys/acct.h>
DESCRIPTION
The acct(2) system call arranges for entries to be made in
an accounting file for each process that terminates. The
accounting file is a sequence of entries whose layout, as
defined by the include file is:
typedef ushort comp_t; /* "floating point" */
/* 13-bit fraction, 3-bit exponent */
struct acct
{
char ac_flag; /* Accounting flag */
char ac_stat; /* Exit status */
ushort ac_uid; /* Accounting user ID */
ushort ac_gid; /* Accounting group ID */
dev_t ac_tty; /* control typewriter */
time_t ac_btime; /* Beginning time */
comp_t ac_utime; /* acctng user time in clock ticks */
comp_t ac_stime; /* acctng system time in clock ticks */
comp_t ac_etime; /* acctng elapsed time in clock ticks */
comp_t ac_mem; /* memory usage */
comp_t ac_io; /* chars transferred */
comp_t ac_rw; /* blocks read or written */
char ac_comm[8]; /* command name */
};
extern struct acct acctbuf;
extern struct inode *acctp; /* inode of accounting file */
#define AFORK 01 /* has executed fork, but no exec */
#define ASU 02 /* used super-user privileges */
#define ACORE 0010 /* dumped core */
#define AXSIG 0020 /* killed by a signal */
#define ACCTF 0300 /* record type: 00 = acct */
#endif _SYS_ACCT_
If the process was created by an execve(2), the first 10
characters of the filename appear in ac_comm. In ac_flag,
the AFORK flag is turned on by each fork(2) and turned off
by an exec(2), the ASU flag is set when a command is exe-
cuted by the super-user, the ACORE flag is set when a com-
mand is terminated with the generation of a core file, and
the AXSIG flag is set when a command is terminated with a
signal.
Printed 1/15/91 Page 1
ACCT(5-BSD) RISC/os Reference Manual ACCT(5-BSD)
SEE ALSO
acct(2), execve(2), sa(8).
Page 2 Printed 1/15/91