3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
24 */
25
26 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
27 /* All Rights Reserved */
28
29 #ifndef _SYS_ACCT_H
30 #define _SYS_ACCT_H
31
32 #include <sys/types.h>
33 #include <sys/types32.h>
34
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38
39 /*
40 * Accounting structures
41 */
42
65 * accounting data files.
66 */
67
68 struct o_acct {
69 char ac_flag; /* Accounting flag */
70 char ac_stat; /* Exit status */
71 o_uid_t ac_uid; /* Accounting user ID */
72 o_gid_t ac_gid; /* Accounting group ID */
73 o_dev_t ac_tty; /* control typewriter */
74 time32_t ac_btime; /* Beginning time */
75 comp_t ac_utime; /* acctng user time in clock ticks */
76 comp_t ac_stime; /* acctng system time in clock ticks */
77 comp_t ac_etime; /* acctng elapsed time in clock ticks */
78 comp_t ac_mem; /* memory usage */
79 comp_t ac_io; /* chars transferred */
80 comp_t ac_rw; /* blocks read or written */
81 char ac_comm[8]; /* command name */
82 };
83
84 #if !defined(_KERNEL)
85 #if defined(__STDC__)
86 extern int acct(const char *);
87 #else
88 extern int acct();
89 #endif
90 #endif /* !defined(_KERNEL) */
91
92 #if defined(_KERNEL)
93
94 void acct(char);
95 int sysacct(char *);
96
97 struct vnode;
98 int acct_fs_in_use(struct vnode *);
99 #endif
100
101 #define AFORK 0001 /* has executed fork, but no exec */
102 #define ASU 0002 /* used super-user privileges */
103 #define AEXPND 0040 /* expanded acct structure */
104 #define ACCTF 0300 /* record type: 00 = acct */
105
106 #ifdef __cplusplus
107 }
108 #endif
109
|
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright 2014 Garrett D'Amore <garrett@damore.org>
24 * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
25 */
26
27 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
28 /* All Rights Reserved */
29
30 #ifndef _SYS_ACCT_H
31 #define _SYS_ACCT_H
32
33 #include <sys/types.h>
34 #include <sys/types32.h>
35
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39
40 /*
41 * Accounting structures
42 */
43
66 * accounting data files.
67 */
68
69 struct o_acct {
70 char ac_flag; /* Accounting flag */
71 char ac_stat; /* Exit status */
72 o_uid_t ac_uid; /* Accounting user ID */
73 o_gid_t ac_gid; /* Accounting group ID */
74 o_dev_t ac_tty; /* control typewriter */
75 time32_t ac_btime; /* Beginning time */
76 comp_t ac_utime; /* acctng user time in clock ticks */
77 comp_t ac_stime; /* acctng system time in clock ticks */
78 comp_t ac_etime; /* acctng elapsed time in clock ticks */
79 comp_t ac_mem; /* memory usage */
80 comp_t ac_io; /* chars transferred */
81 comp_t ac_rw; /* blocks read or written */
82 char ac_comm[8]; /* command name */
83 };
84
85 #if !defined(_KERNEL)
86 extern int acct(const char *);
87 #endif /* !defined(_KERNEL) */
88
89 #if defined(_KERNEL)
90
91 void acct(char);
92 int sysacct(char *);
93
94 struct vnode;
95 int acct_fs_in_use(struct vnode *);
96 #endif
97
98 #define AFORK 0001 /* has executed fork, but no exec */
99 #define ASU 0002 /* used super-user privileges */
100 #define AEXPND 0040 /* expanded acct structure */
101 #define ACCTF 0300 /* record type: 00 = acct */
102
103 #ifdef __cplusplus
104 }
105 #endif
106
|