xref: /original-bsd/sys/sys/acct.h (revision c3e32dec)
1 /*-
2  * Copyright (c) 1990, 1993
3  *	The Regents of the University of California.  All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  *
7  *	@(#)acct.h	8.1 (Berkeley) 06/02/93
8  */
9 
10 /*
11  * Accounting structures; these use a comp_t type which is a 3 bits base 8
12  * exponent, 13 bit fraction ``floating point'' number.  Units are 1/AHZ
13  * seconds.
14  */
15 typedef u_short comp_t;
16 
17 struct acct {
18 	char	ac_comm[10];	/* command name */
19 	comp_t	ac_utime;	/* user time */
20 	comp_t	ac_stime;	/* system time */
21 	comp_t	ac_etime;	/* elapsed time */
22 	time_t	ac_btime;	/* starting time */
23 	uid_t	ac_uid;		/* user id */
24 	gid_t	ac_gid;		/* group id */
25 	short	ac_mem;		/* average memory usage */
26 	comp_t	ac_io;		/* count of IO blocks */
27 	dev_t	ac_tty;		/* controlling tty */
28 #define	AFORK	0x01			/* forked but not execed */
29 #define	ASU	0x02			/* used super-user permissions */
30 #define	ACOMPAT	0x04			/* used compatibility mode */
31 #define	ACORE	0x08			/* dumped core */
32 #define	AXSIG	0x10			/* killed by a signal */
33 	char	ac_flag;	/* accounting flags */
34 };
35 
36 /*
37  * 1/AHZ is the granularity of the data encoded in the comp_t fields.
38  * This is not necessarily equal to hz.
39  */
40 #define	AHZ	64
41 
42 #ifdef KERNEL
43 struct vnode	*acctp;
44 #endif
45