Merge commit '008b34be09d7b9c3e7a18d3ce9ef8b5c4f4ff8b8'
[unleashed.git] / share / man / man1 / acctcom.1
blob7bb5ab6516ecb4ffc53bd6a24f8913f4ea3174ec
1 '\" te
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"
8 .SH NAME
9 acctcom \- search and print process accounting files
10 .SH SYNOPSIS
11 .LP
12 .nf
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]...
17 .fi
19 .SH DESCRIPTION
20 .sp
21 .LP
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
31 and written).
32 .sp
33 .LP
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.
37 .sp
38 .LP
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
42 read.
43 .sp
44 .LP
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.
50 .SH OPTIONS
51 .sp
52 .LP
53 The following options are supported:
54 .sp
55 .ne 2
56 .na
57 \fB\fB-a\fR\fR
58 .ad
59 .RS 18n
60 Show some average statistics about the processes selected. The statistics will
61 be printed after the output records.
62 .RE
64 .sp
65 .ne 2
66 .na
67 \fB\fB-b\fR\fR
68 .ad
69 .RS 18n
70 Read backwards, showing latest commands first. This option has no effect when
71 standard input is read.
72 .RE
74 .sp
75 .ne 2
76 .na
77 \fB\fB-f\fR\fR
78 .ad
79 .RS 18n
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.
82 .RE
84 .sp
85 .ne 2
86 .na
87 \fB\fB-h\fR\fR
88 .ad
89 .RS 18n
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).
93 .RE
95 .sp
96 .ne 2
97 .na
98 \fB\fB-i\fR\fR
99 .ad
100 .RS 18n
101 Print columns containing the \fBI/O\fR counts in the output.
105 .ne 2
107 \fB\fB-k\fR\fR
109 .RS 18n
110 Instead of memory size, show total kcore-minutes.
114 .ne 2
116 \fB\fB-m\fR\fR
118 .RS 18n
119 Show mean core size (the default).
123 .ne 2
125 \fB\fB-q\fR\fR
127 .RS 18n
128 Do not print any output records, just print the average statistics as with the
129 \fB-a\fR option.
133 .ne 2
135 \fB\fB-r\fR\fR
137 .RS 18n
138 Show \fBCPU\fR factor (user-time/(system-time + user-time)).
142 .ne 2
144 \fB\fB-t\fR\fR
146 .RS 18n
147 Show separate system and user \fBCPU\fR times.
151 .ne 2
153 \fB\fB-v\fR\fR
155 .RS 18n
156 Exclude column headings from the output.
160 .ne 2
162 \fB\fB-C\fR \fIsec\fR\fR
164 .RS 18n
165 Show only processes with total \fBCPU\fR time (system-time + user-time)
166 exceeding \fIsec\fR seconds.
170 .ne 2
172 \fB\fB-e\fR \fItime\fR\fR
174 .RS 18n
175 Select processes existing at or before \fItime\fR.
179 .ne 2
181 \fB\fB-E\fR \fItime\fR\fR
183 .RS 18n
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.
189 .ne 2
191 \fB\fB-g\fR \fIgroup\fR\fR
193 .RS 18n
194 Show only processes belonging to \fIgroup\fR. The \fIgroup\fR may be designated
195 by either the group \fBID\fR or group name.
199 .ne 2
201 \fB\fB-H\fR \fIfactor\fR\fR
203 .RS 18n
204 Show only processes that exceed \fBfactor\fR, where factor is the "hog factor"
205 as explained in option \fB-h\fR above.
209 .ne 2
211 \fB\fB-I\fR \fIchars\fR\fR
213 .RS 18n
214 Show only processes transferring more characters than the cutoff number given
215 by \fIchars\fR.
219 .ne 2
221 \fB\fB-l\fR \fIline\fR\fR
223 .RS 18n
224 Show only processes belonging to terminal \fB/dev/term/line\fR.
228 .ne 2
230 \fB\fB-n\fR \fIpattern\fR\fR
232 .RS 18n
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.
238 .ne 2
240 \fB\fB-o\fR \fIoutput-file\fR\fR
242 .RS 18n
243 Copy selected process records in the input data format to \fIoutput-file\fR;
244 suppress printing to standard output.
248 .ne 2
250 \fB\fB-O\fR \fIsec\fR\fR
252 .RS 18n
253 Show only processes with \fBCPU\fR system time exceeding \fIsec\fR seconds.
257 .ne 2
259 \fB\fB-s\fR \fItime\fR\fR
261 .RS 18n
262 Select processes existing at or after \fItime\fR, given in the format
263 \fIhr\fR\|[\|:\fImin\fR\|[\|:\fIsec\fR\|]\|].
267 .ne 2
269 \fB\fB-S\fR \fItime\fR\fR
271 .RS 18n
272 Select processes starting at or after \fItime\fR.
276 .ne 2
278 \fB\fB-u\fR \fIuser\fR\fR
280 .RS 18n
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).
288 .SH FILES
290 .ne 2
292 \fB\fB/etc/group\fR\fR
294 .RS 22n
295 system group file
299 .ne 2
301 \fB\fB/etc/passwd\fR\fR
303 .RS 22n
304 system password file
308 .ne 2
310 \fB\fB/var/adm/pacct\fIincr\fR\fR\fR
312 .RS 22n
313 active processes accounting file
316 .SH ATTRIBUTES
319 See \fBattributes\fR(5) for descriptions of the following attributes:
324 box;
325 c | c
326 l | l .
327 ATTRIBUTE TYPE  ATTRIBUTE VALUE
329 CSI     Enabled
332 .SH SEE ALSO
335 \fBps\fR(1), \fBacct\fR(8), \fBacctcms\fR(8), \fBacctcon\fR(8),
336 \fBacctmerg\fR(8), \fBacctprc\fR(8), \fBacctsh\fR(8), \fBfwtmp\fR(8),
337 \fBrunacct\fR(8), \fBsu\fR(8), \fBacct\fR(2), \fBregcmp\fR(3C),
338 \fBacct.h\fR(3HEAD), \fButmp\fR(4), \fBattributes\fR(5)
341 \fISystem Administration Guide: Basic Administration\fR
342 .SH NOTES
345 \fBacctcom\fR reports only on processes that have terminated; use \fBps\fR(1)
346 for active processes.