8980 BIOS clock is sometimes one hour fast
[unleashed.git] / usr / src / man / man1m / wracct.1m
blobc3e99d37705f4f041759d41ddc02af2cde1bad27
1 '\" te
2 .\" Copyright (c) 2000, Sun Microsystems, Inc. All Rights Reserved.
3 .\" 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.
4 .\" 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.
5 .\" 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]
6 .TH WRACCT 1M "Jul 13, 2005"
7 .SH NAME
8 wracct \- write extended accounting records for active processes and tasks
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fB/usr/sbin/wracct\fR \fB-i\fR \fIid_list\fR [\fB-t\fR \fIrecord_type\fR]
13      {process | task}
14 .fi
16 .SH DESCRIPTION
17 .sp
18 .LP
19 The \fBwracct\fR utility allows the administrator to invoke the extended
20 accounting system, if active, to write intermediate records representing the
21 resource usage of a selected set of processes or tasks. For tasks, a
22 \fIrecord_type\fR option is also supported, allowing the administrator to
23 request the writing of:
24 .RS +4
25 .TP
26 .ie t \(bu
27 .el o
28 an interval record, which reflects task usage since a previous interval record
29 (or since task creation if there is no interval record), or
30 .RE
31 .RS +4
32 .TP
33 .ie t \(bu
34 .el o
35 a partial record, which reflects usage since task creation.
36 .RE
37 .SH OPTIONS
38 .sp
39 .LP
40 The following options are supported:
41 .sp
42 .ne 2
43 .na
44 \fB\fB-i\fR \fIid_list\fR\fR
45 .ad
46 .RS 18n
47 Select the \fBID\fRs of the tasks or processes to write records for. Specify
48 \fIid_list\fR as a comma- or space-separated list of IDs, presented as a single
49 argument. For some shells, this requires appropriate quoting of the argument.
50 .RE
52 .sp
53 .ne 2
54 .na
55 \fB\fB-t\fR \fIrecord_type\fR\fR
56 .ad
57 .RS 18n
58 Select type of record to write for the selected task or process. For tasks,
59 \fIrecord_type\fR can be \fBpartial\fR or \fBinterval\fR. \fBpartial\fR is the
60 default type, and the only type available for process records.
61 .RE
63 .SH OPERANDS
64 .sp
65 .LP
66 The following operands are supported:
67 .sp
68 .ne 2
69 .na
70 \fB\fBprocess\fR\fR
71 .ad
72 .RS 11n
73 Treat the given \fBID\fR as a process \fBID\fR for the purposes of constructing
74 and writing an extended accounting record.
75 .RE
77 .sp
78 .ne 2
79 .na
80 \fB\fBtask\fR\fR
81 .ad
82 .RS 11n
83 Treat the given \fBID\fR as a task \fBID\fR for the purposes of constructing
84 and writing an extended accounting record.
85 .RE
87 .SH EXAMPLES
88 .LP
89 \fBExample 1 \fRWriting a Partial Record
90 .sp
91 .LP
92 Write a partial record for all active \fBsendmail\fR processes.
94 .sp
95 .in +2
96 .nf
97 # /usr/sbin/wracct -i "`pgrep sendmail`" process
98 .fi
99 .in -2
103 \fBExample 2 \fRWriting an Interval Record
106 Write an interval record for the task with \fBID 182\fR.
109 .in +2
111 # /usr/sbin/wracct -t interval -i 182 task
113 .in -2
116 .SH EXIT STATUS
119 The following exit values are returned:
121 .ne 2
123 \fB\fB0\fR\fR
125 .RS 5n
126 Successful completion.
130 .ne 2
132 \fB\fB1\fR\fR
134 .RS 5n
135 An error occurred.
139 .ne 2
141 \fB\fB2\fR\fR
143 .RS 5n
144 Invalid command line options were specified.
148 .ne 2
150 \fB\fB3\fR\fR
152 .RS 5n
153 Pertinent components of extended accounting facility are not active.
156 .SH FILES
158 .ne 2
160 \fB\fB/var/adm/exacct/task\fR\fR
162 .RS 24n
167 .ne 2
169 \fB\fB/var/adm/exacct/proc\fR\fR
171 .RS 24n
172 Extended accounting data files.
175 .SH SEE ALSO
178 \fBacctadm\fR(1M), \fBattributes\fR(5)