Changeset View
Changeset View
Standalone View
Standalone View
head/share/man/man5/acct.5
Show All 22 Lines | |||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" @(#)acct.5 8.1 (Berkeley) 6/5/93 | .\" @(#)acct.5 8.1 (Berkeley) 6/5/93 | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd May 15, 2007 | .Dd February 13, 2017 | ||||
.Dt ACCT 5 | .Dt ACCT 5 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm acct | .Nm acct | ||||
.Nd execution accounting file | .Nd execution accounting file | ||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
.In sys/types.h | .In sys/types.h | ||||
.In sys/acct.h | .In sys/acct.h | ||||
.Sh DESCRIPTION | .Sh DESCRIPTION | ||||
The kernel maintains the following | The kernel maintains the following | ||||
.Fa acct | .Fa acct | ||||
information structure for all | information structure for all | ||||
processes. | processes. | ||||
If a process terminates, and accounting is enabled, | If a process terminates, and accounting is enabled, | ||||
the kernel calls the | the kernel calls the | ||||
.Xr acct 2 | .Xr acct 2 | ||||
function call to prepare and append the record | function call to prepare and append the record | ||||
to the accounting file. | to the accounting file. | ||||
.Bd -literal | .Bd -literal | ||||
#define AC_COMM_LEN 16 | #define AC_COMM_LEN 16 | ||||
/* | /* | ||||
* Accounting structure version 2 (current). | * Accounting structure version 3 (current). | ||||
* The first byte is always zero. | * The first byte is always zero. | ||||
* Time units are microseconds. | * Time units are microseconds. | ||||
*/ | */ | ||||
struct acctv2 { | struct acctv3 { | ||||
uint8_t ac_zero; /* zero identifies new version */ | uint8_t ac_zero; /* zero identifies new version */ | ||||
uint8_t ac_version; /* record version number */ | uint8_t ac_version; /* record version number */ | ||||
uint16_t ac_len; /* record length */ | uint16_t ac_len; /* record length */ | ||||
char ac_comm[AC_COMM_LEN]; /* command name */ | char ac_comm[AC_COMM_LEN]; /* command name */ | ||||
float ac_utime; /* user time */ | float ac_utime; /* user time */ | ||||
float ac_stime; /* system time */ | float ac_stime; /* system time */ | ||||
float ac_etime; /* elapsed time */ | float ac_etime; /* elapsed time */ | ||||
time_t ac_btime; /* starting time */ | time_t ac_btime; /* starting time */ | ||||
uid_t ac_uid; /* user id */ | uid_t ac_uid; /* user id */ | ||||
gid_t ac_gid; /* group id */ | gid_t ac_gid; /* group id */ | ||||
float ac_mem; /* average memory usage */ | float ac_mem; /* average memory usage */ | ||||
float ac_io; /* count of IO blocks */ | float ac_io; /* count of IO blocks */ | ||||
__dev_t ac_tty; /* controlling tty */ | __dev_t ac_tty; /* controlling tty */ | ||||
uint16_t ac_len2; /* record length */ | uint16_t ac_len2; /* record length */ | ||||
union { | union { | ||||
__dev_t ac_align; /* force v1 compatible alignment */ | uint32_t ac_align; /* force v1 compatible alignment */ | ||||
#define AFORK 0x01 /* forked but not exec'ed */ | #define AFORK 0x01 /* forked but not exec'ed */ | ||||
/* ASU is no longer supported */ | /* ASU is no longer supported */ | ||||
#define ASU 0x02 /* used super-user permissions */ | #define ASU 0x02 /* used super-user permissions */ | ||||
#define ACOMPAT 0x04 /* used compatibility mode */ | #define ACOMPAT 0x04 /* used compatibility mode */ | ||||
#define ACORE 0x08 /* dumped core */ | #define ACORE 0x08 /* dumped core */ | ||||
#define AXSIG 0x10 /* killed by a signal */ | #define AXSIG 0x10 /* killed by a signal */ | ||||
#define ANVER 0x20 /* new record version */ | #define ANVER 0x20 /* new record version */ | ||||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |