2 .\" Copyright 1989 AT&T
3 .\" Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved
4 .\" 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.
5 .\" 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.
6 .\" 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]
7 .TH ACCTCOM 1 "Jan 11, 1996"
9 acctcom \- search and print process accounting files
13 \fBacctcom\fR [\fB-abfhikmqrtv\fR] [\fB-C\fR \fIsec\fR] [\fB-e\fR \fItime\fR] [\fB-E\fR \fItime\fR]
14 [\fB-g\fR \fIgroup\fR] [\fB-H\fR \fIfactor\fR] [\fB-I\fR \fIchars\fR] [\fB-l\fR \fIline\fR]
15 [\fB-n\fR \fIpattern\fR] [\fB-o\fR \fIoutput-file\fR] [\fB-O\fR \fIsec\fR] [\fB-s\fR \fItime\fR]
16 [\fB-S\fR \fItime\fR] [\fB-u\fR \fIuser\fR] [\fIfilename\fR]...
22 The \fBacctcom\fR utility reads \fIfilename\fRs, the standard input, or
23 \fB/var/adm/pacct\fR, in the form described by \fBacct.h\fR(3HEAD) and writes
24 selected records to standard output. Each record represents the execution of
25 one process. The output shows the \fBCOMMAND NAME\fR, \fBUSER\fR,
26 \fBTTYNAME\fR, \fBSTART TIME\fR, \fBEND TIME\fR, \fBREAL (SEC)\fR, \fBCPU
27 (SEC)\fR, \fBMEAN SIZE (K)\fR, and optionally, \fBF\fR (the
28 \fBfork()\fR/\fBexec()\fR flag: \fB1\fR for \fBfork()\fR without \fBexec()\fR),
29 \fBSTAT\fR (the system exit status), \fBHOG FACTOR\fR, \fBKCORE MIN\fR, \fBCPU
30 FACTOR\fR, \fBCHARS TRNSFD\fR, and \fBBLOCKS\fR \fBREAD\fR (total blocks read
34 A `\fB#\fR' is prepended to the command name if the command was executed with
35 super-user privileges. If a process is not associated with a known terminal, a
36 `\fB?\fR' is printed in the \fBTTYNAME\fR field.
39 If no \fIfilename\fR is specified, and if the standard input is associated
40 with a terminal or \fB/dev/null\fR (as is the case when using `\fB&\fR\&' in
41 the shell), \fB/var/adm/pacct\fR is read; otherwise, the standard input is
45 If any \fIfilename\fR arguments are given, they are read in their respective
46 order. Each file is normally read forward, that is, in chronological order by
47 process completion time. The file \fB/var/adm/pacct\fR is usually the current
48 file to be examined; a busy system may need several such files of which all but
49 the current file are found in \fB/var/adm/pacct\fIincr\fR\fR.
53 The following options are supported:
60 Show some average statistics about the processes selected. The statistics will
61 be printed after the output records.
70 Read backwards, showing latest commands first. This option has no effect when
71 standard input is read.
80 Print the \fBfork()\fR/\fBexec()\fR flag and system exit status columns in the
81 output. The numeric output for this option will be in octal.
90 Instead of mean memory size, show the fraction of total available \fBCPU\fR
91 time consumed by the process during its execution. This "hog factor" is
92 computed as (total \fBCPU\fR time)/(elapsed time).
101 Print columns containing the \fBI/O\fR counts in the output.
110 Instead of memory size, show total kcore-minutes.
119 Show mean core size (the default).
128 Do not print any output records, just print the average statistics as with the
138 Show \fBCPU\fR factor (user-time/(system-time + user-time)).
147 Show separate system and user \fBCPU\fR times.
156 Exclude column headings from the output.
162 \fB\fB-C\fR \fIsec\fR\fR
165 Show only processes with total \fBCPU\fR time (system-time + user-time)
166 exceeding \fIsec\fR seconds.
172 \fB\fB-e\fR \fItime\fR\fR
175 Select processes existing at or before \fItime\fR.
181 \fB\fB-E\fR \fItime\fR\fR
184 Select processes ending at or before \fItime\fR. Using the same \fItime\fR for
185 both \fB-S\fR and \fB-E\fR shows the processes that existed at \fItime\fR.
191 \fB\fB-g\fR \fIgroup\fR\fR
194 Show only processes belonging to \fIgroup\fR. The \fIgroup\fR may be designated
195 by either the group \fBID\fR or group name.
201 \fB\fB-H\fR \fIfactor\fR\fR
204 Show only processes that exceed \fBfactor\fR, where factor is the "hog factor"
205 as explained in option \fB-h\fR above.
211 \fB\fB-I\fR \fIchars\fR\fR
214 Show only processes transferring more characters than the cutoff number given
221 \fB\fB-l\fR \fIline\fR\fR
224 Show only processes belonging to terminal \fB/dev/term/line\fR.
230 \fB\fB-n\fR \fIpattern\fR\fR
233 Show only commands matching \fIpattern\fR that may be a regular expression as
234 in \fBregcmp\fR(3C), except \fB+\fR means one or more occurrences.
240 \fB\fB-o\fR \fIoutput-file\fR\fR
243 Copy selected process records in the input data format to \fIoutput-file\fR;
244 suppress printing to standard output.
250 \fB\fB-O\fR \fIsec\fR\fR
253 Show only processes with \fBCPU\fR system time exceeding \fIsec\fR seconds.
259 \fB\fB-s\fR \fItime\fR\fR
262 Select processes existing at or after \fItime\fR, given in the format
263 \fIhr\fR\|[\|:\fImin\fR\|[\|:\fIsec\fR\|]\|].
269 \fB\fB-S\fR \fItime\fR\fR
272 Select processes starting at or after \fItime\fR.
278 \fB\fB-u\fR \fIuser\fR\fR
281 Show only processes belonging to \fIuser\fR. The user may be specified by a
282 user \fBID\fR, a login name that is then converted to a user \fBID\fR,
283 `\fB#\fR' (which designates only those processes executed with superuser
284 privileges), or `\fB?\fR' (which designates only those processes associated
285 with unknown user \fBID\fRs).
292 \fB\fB/etc/group\fR\fR
301 \fB\fB/etc/passwd\fR\fR
310 \fB\fB/var/adm/pacct\fIincr\fR\fR\fR
313 active processes accounting file
319 See \fBattributes\fR(5) for descriptions of the following attributes:
327 ATTRIBUTE TYPE ATTRIBUTE VALUE
335 \fBps\fR(1), \fBacct\fR(1M), \fBacctcms\fR(1M), \fBacctcon\fR(1M),
336 \fBacctmerg\fR(1M), \fBacctprc\fR(1M), \fBacctsh\fR(1M), \fBfwtmp\fR(1M),
337 \fBrunacct\fR(1M), \fBsu\fR(1M), \fBacct\fR(2), \fBregcmp\fR(3C),
338 \fBacct.h\fR(3HEAD), \fButmp\fR(4), \fBattributes\fR(5)
341 \fISystem Administration Guide: Basic Administration\fR
345 \fBacctcom\fR reports only on processes that have terminated; use \fBps\fR(1)
346 for active processes.