1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
|
'\" te
.\" Copyright (c) 2000, Sun Microsystems, Inc. All Rights Reserved.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH WRACCT 1M "Jul 13, 2005"
.SH NAME
wracct \- write extended accounting records for active processes and tasks
.SH SYNOPSIS
.LP
.nf
\fB/usr/sbin/wracct\fR \fB-i\fR \fIid_list\fR [\fB-t\fR \fIrecord_type\fR]
{process | task}
.fi
.SH DESCRIPTION
.sp
.LP
The \fBwracct\fR utility allows the administrator to invoke the extended
accounting system, if active, to write intermediate records representing the
resource usage of a selected set of processes or tasks. For tasks, a
\fIrecord_type\fR option is also supported, allowing the administrator to
request the writing of:
.RS +4
.TP
.ie t \(bu
.el o
an interval record, which reflects task usage since a previous interval record
(or since task creation if there is no interval record), or
.RE
.RS +4
.TP
.ie t \(bu
.el o
a partial record, which reflects usage since task creation.
.RE
.SH OPTIONS
.sp
.LP
The following options are supported:
.sp
.ne 2
.na
\fB\fB-i\fR \fIid_list\fR\fR
.ad
.RS 18n
Select the \fBID\fRs of the tasks or processes to write records for. Specify
\fIid_list\fR as a comma- or space-separated list of IDs, presented as a single
argument. For some shells, this requires appropriate quoting of the argument.
.RE
.sp
.ne 2
.na
\fB\fB-t\fR \fIrecord_type\fR\fR
.ad
.RS 18n
Select type of record to write for the selected task or process. For tasks,
\fIrecord_type\fR can be \fBpartial\fR or \fBinterval\fR. \fBpartial\fR is the
default type, and the only type available for process records.
.RE
.SH OPERANDS
.sp
.LP
The following operands are supported:
.sp
.ne 2
.na
\fB\fBprocess\fR\fR
.ad
.RS 11n
Treat the given \fBID\fR as a process \fBID\fR for the purposes of constructing
and writing an extended accounting record.
.RE
.sp
.ne 2
.na
\fB\fBtask\fR\fR
.ad
.RS 11n
Treat the given \fBID\fR as a task \fBID\fR for the purposes of constructing
and writing an extended accounting record.
.RE
.SH EXAMPLES
.LP
\fBExample 1 \fRWriting a Partial Record
.sp
.LP
Write a partial record for all active \fBsendmail\fR processes.
.sp
.in +2
.nf
# /usr/sbin/wracct -i "`pgrep sendmail`" process
.fi
.in -2
.sp
.LP
\fBExample 2 \fRWriting an Interval Record
.sp
.LP
Write an interval record for the task with \fBID 182\fR.
.sp
.in +2
.nf
# /usr/sbin/wracct -t interval -i 182 task
.fi
.in -2
.sp
.SH EXIT STATUS
.sp
.LP
The following exit values are returned:
.sp
.ne 2
.na
\fB\fB0\fR\fR
.ad
.RS 5n
Successful completion.
.RE
.sp
.ne 2
.na
\fB\fB1\fR\fR
.ad
.RS 5n
An error occurred.
.RE
.sp
.ne 2
.na
\fB\fB2\fR\fR
.ad
.RS 5n
Invalid command line options were specified.
.RE
.sp
.ne 2
.na
\fB\fB3\fR\fR
.ad
.RS 5n
Pertinent components of extended accounting facility are not active.
.RE
.SH FILES
.sp
.ne 2
.na
\fB\fB/var/adm/exacct/task\fR\fR
.ad
.RS 24n
.RE
.sp
.ne 2
.na
\fB\fB/var/adm/exacct/proc\fR\fR
.ad
.RS 24n
Extended accounting data files.
.RE
.SH SEE ALSO
.sp
.LP
\fBacctadm\fR(1M), \fBattributes\fR(5)
|