xref: /original-bsd/sys/sys/acct.h (revision 62734ea8)
1 /*	acct.h	4.5	82/10/10	*/
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  */
8 typedef	u_short comp_t;
9 
10 struct	acct
11 {
12 	char	ac_comm[10];		/* Accounting command name */
13 	comp_t	ac_utime;		/* Accounting user time */
14 	comp_t	ac_stime;		/* Accounting system time */
15 	comp_t	ac_etime;		/* Accounting elapsed time */
16 	time_t	ac_btime;		/* Beginning time */
17 	short	ac_uid;			/* Accounting user ID */
18 	short	ac_gid;			/* Accounting group ID */
19 	short	ac_mem;			/* average memory usage */
20 	comp_t	ac_io;			/* number of disk IO blocks */
21 	dev_t	ac_tty;			/* control typewriter */
22 	char	ac_flag;		/* Accounting flag */
23 };
24 
25 #define	AFORK	0001		/* has executed fork, but no exec */
26 #define	ASU	0002		/* used super-user privileges */
27 #define	ACOMPAT	0004		/* used compatibility mode */
28 #define	ACORE	0010		/* dumped core */
29 #define	AXSIG	0020		/* killed by a signal */
30 
31 #define	ACCTLO	30		/* acctg off when space < this */
32 #define	ACCTHI	100		/* acctg resumes at this level */
33 
34 #ifdef KERNEL
35 struct	acct	acctbuf;
36 struct	inode	*acctp;
37 #endif
38