'\" 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 8 "August 13, 2023" .SH NAME wracct \- write extended accounting records for active processes and tasks .SH SYNOPSIS .nf \fB/usr/bin/wracct\fR \fB-i\fR \fIid_list\fR [\fB-t\fR \fIrecord_type\fR] {process | task} .fi .SH DESCRIPTION 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 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 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 \fBExample 1 \fRWriting a Partial Record .sp .LP Write a partial record for all active \fBsendmail\fR processes. .sp .in +2 .nf # /usr/bin/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/bin/wracct -t interval -i 182 task .fi .in -2 .sp .SH EXIT STATUS 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 .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 .BR attributes (7), .BR acctadm (8)