The wracct 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 record_type option is also supported, allowing the administrator to request the writing of a partial record, which leaves the current task usage unchanged, or an interval record, which resets the task usage to zero for that system task, with respect to the extended accounting subsystem. If interval records are used, the total task usage is the sum of all interval records and the final record written at the task's completion. If partial records are used, the completion record reflects the total resource usage.
The following options are supported:
Select the IDs of the tasks or processes to write records for. Specify id_list as a comma- or space-separated list of IDs, presented as a single argument. For some shells, this requires appropriate quoting of the argument.
Select type of record to write for the selected task or process. For tasks, record_type can be partial or interval. partial is the the default type, and the only type available for process records.
The following operands are supported:
Treat the given ID as a process ID for the purposes of constructing and writing an extended accounting record.
Treat the given ID as a task ID for the purposes of constructing and writing an extended accounting record.
Write a partial record for all active sendmail processes.
# /usr/sbin/wracct -i "`pgrep sendmail`" process
Write an interval record for the task with ID 182.
# /usr/sbin/wracct -t interval -i 182 task
The following exit values are returned:
An error occurred.
Invalid command line options were specified.
Pertinent components of extended accounting facility are not active.
See attributes(5) for descriptions of the following attributes:
|ATTRIBUTE TYPE||ATTRIBUTE VALUE|