Move everything from /var/adm to /var/log
[unleashed.git] / share / man / man1 / timex.1
blobde302980cb428976cb86521b97c98ac548a916e6
1 '\" te
2 .\"  Copyright 1989 AT&T  Copyright (c) 1992, Sun Microsystems, Inc.  All Rights Reserved
3 .\" 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.
4 .\" 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.
5 .\" 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]
6 .TH TIMEX 1 "Sep 14, 1992"
7 .SH NAME
8 timex \- time a command; report process data and system activity
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBtimex\fR [\fB-o\fR] [\fB-p\fR [\fB-fhkmrt\fR]] [\fB-s\fR] \fIcommand\fR
13 .fi
15 .SH DESCRIPTION
16 .sp
17 .LP
18 The given \fBcommand\fR is executed; the elapsed time, user time and system
19 time spent in execution are reported in seconds. Optionally, process accounting
20 data for the \fBcommand\fR and all its children can be listed or summarized,
21 and total system activity during the execution interval can be reported.
22 .sp
23 .LP
24 The output of \fBtimex\fR is written on standard error.
25 .SH OPTIONS
26 .sp
27 .LP
28 The following options are supported:
29 .sp
30 .ne 2
31 .na
32 \fB\fB-o\fR\fR
33 .ad
34 .RS 6n
35 Report the total number of blocks read or written and total characters
36 transferred by  \fBcommand\fR and all its children. This option works only if
37 the process accounting software is installed.
38 .RE
40 .sp
41 .ne 2
42 .na
43 \fB\fB-p\fR\fR
44 .ad
45 .RS 6n
46 List process accounting records for \fBcommand\fR and all its children. This
47 option works only if the process accounting software is installed. Suboptions
48 \fBf\fR, \fBh\fR, \fBk\fR, \fBm\fR, \fBr\fR, and \fBt\fR modify the data items
49 reported. The options are as follows:
50 .sp
51 .ne 2
52 .na
53 \fB\fB-f\fR\fR
54 .ad
55 .RS 6n
56 Print the \fBfork\fR(2)/ \fBexec\fR(2) flag and system exit status columns in
57 the output.
58 .RE
60 .sp
61 .ne 2
62 .na
63 \fB\fB-h\fR\fR
64 .ad
65 .RS 6n
66 Instead of mean memory size, show the fraction of total available CPU time
67 consumed by the process during its execution. This ``hog factor'' is computed
68 as (total CPU time)/(elapsed time).
69 .RE
71 .sp
72 .ne 2
73 .na
74 \fB\fB-k\fR\fR
75 .ad
76 .RS 6n
77 Instead of memory size, show total kcore-minutes.
78 .RE
80 .sp
81 .ne 2
82 .na
83 \fB\fB-m\fR\fR
84 .ad
85 .RS 6n
86 Show mean core size (the default).
87 .RE
89 .sp
90 .ne 2
91 .na
92 \fB\fB-r\fR\fR
93 .ad
94 .RS 6n
95 Show CPU factor (user time/(system-time + user-time)).
96 .RE
98 .sp
99 .ne 2
101 \fB\fB-t\fR\fR
103 .RS 6n
104 Show separate system and user CPU times. The number of blocks read or written
105 and the number of characters transferred are always reported.
111 .ne 2
113 \fB\fB-s\fR\fR
115 .RS 6n
116 Report total system activity (not just that due to  \fBcommand\fR) that
117 occurred during the execution interval of \fBcommand\fR. All the data items
118 listed in  \fBsar\fR(1) are reported.
121 .SH EXAMPLES
123 \fBExample 1 \fRExamples of \fBtimex\fR.
126 A simple example:
129 .in +2
131 \fBexample% timex \fR\fB-ops\fR\fB sleep 60\fR
133 .in -2
138 A terminal session of arbitrary complexity can be measured by timing a
139 sub-shell:
142 .in +2
144 \fBexample% timex \fR\fB-opskmt\fR\fB sh\fR
145       \fIsession commands\fR
146 \fBEOT\fR
148 .in -2
151 .SH SEE ALSO
154 \fBsar\fR(1), \fBtime\fR(1), \fBexec\fR(2), \fBfork\fR(2), \fBtimes\fR(2),
155 \fBattributes\fR(5)
156 .SH NOTES
159 Process records associated with \fBcommand\fR are selected from the accounting
160 file \fB/var/log/pacct\fR by inference, since process genealogy is not
161 available. Background processes having the same user ID, terminal ID, and
162 execution time window will be spuriously included.