'\" te .\" Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. .TH wracct 1M "7 May 2012" "SunOS 5.11" "System Administration Commands" .SH NAME wracct \- write extended accounting records for active processes and tasks .SH SYNOPSIS .LP .nf \fB/usr/bin/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 .mk .na \fB\fB-i\fR \fIid_list\fR\fR .ad .RS 18n .rt 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 .mk .na \fB\fB-t\fR \fIrecord_type\fR\fR .ad .RS 18n .rt 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 .mk .na \fB\fBprocess\fR\fR .ad .RS 11n .rt 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 .mk .na \fB\fBtask\fR\fR .ad .RS 11n .rt 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/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 .sp .LP The following exit values are returned: .sp .ne 2 .mk .na \fB\fB0\fR\fR .ad .RS 5n .rt Successful completion. .RE .sp .ne 2 .mk .na \fB\fB1\fR\fR .ad .RS 5n .rt An error occurred. .RE .sp .ne 2 .mk .na \fB\fB2\fR\fR .ad .RS 5n .rt Invalid command line options were specified. .RE .sp .ne 2 .mk .na \fB\fB3\fR\fR .ad .RS 5n .rt Pertinent components of extended accounting facility are not active. .RE .SH FILES .sp .ne 2 .mk .na \fB\fB/var/adm/exacct/task\fR\fR .ad .RS 24n .rt Extended accounting task files. .RE .sp .ne 2 .mk .na \fB\fB/var/adm/exacct/proc\fR\fR .ad .RS 24n .rt Extended accounting data files. .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Availabilitysystem/core-os .TE .SH SEE ALSO .sp .LP \fBacctadm\fR(1M), \fBattributes\fR(5)