xref: /original-bsd/sys/sys/acct.h (revision 7e7b101a)
1 /*	acct.h	6.2	84/12/12	*/
2 
3 /*
4  * Accounting structures;
5  * these use a comp_t type which is a 3 bits base 8
6  * exponent, 13 bit fraction ``floating point'' number.
7  * Units are 1/AHZ seconds.
8  */
9 typedef	u_short comp_t;
10 
11 struct	acct
12 {
13 	char	ac_comm[10];		/* Accounting command name */
14 	comp_t	ac_utime;		/* Accounting user time */
15 	comp_t	ac_stime;		/* Accounting system time */
16 	comp_t	ac_etime;		/* Accounting elapsed time */
17 	time_t	ac_btime;		/* Beginning time */
18 	short	ac_uid;			/* Accounting user ID */
19 	short	ac_gid;			/* Accounting group ID */
20 	short	ac_mem;			/* average memory usage */
21 	comp_t	ac_io;			/* number of disk IO blocks */
22 	dev_t	ac_tty;			/* control typewriter */
23 	char	ac_flag;		/* Accounting flag */
24 };
25 
26 #define	AFORK	0001		/* has executed fork, but no exec */
27 #define	ASU	0002		/* used super-user privileges */
28 #define	ACOMPAT	0004		/* used compatibility mode */
29 #define	ACORE	0010		/* dumped core */
30 #define	AXSIG	0020		/* killed by a signal */
31 
32 /*
33  * 1/AHZ is the granularity of the data encoded in the various
34  * comp_t fields.  This is not necessarily equal to hz.
35  */
36 #define AHZ 64
37 
38 #ifdef KERNEL
39 struct	acct	acctbuf;
40 struct	inode	*acctp;
41 #endif
42