xref: /illumos-gate/usr/src/man/man1b/rusage.1b (revision 81b2d5738d8e67bdf2438cd3e8c79f379bce44d2)
te
Copyright (c) 2003, Sun Microsystems, Inc.
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.
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.
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]
rusage 1B "14 Sep 1992" "SunOS 5.11" "SunOS/BSD Compatibility Package Commands"
NAME
rusage - print resource usage for a command
SYNOPSIS

/usr/ucb/rusage command
DESCRIPTION

The rusage command is similar to time(1). It runs the given command, which must be specified; that is, command is not optional as it is in the C shell's timing facility. When the command is complete, rusage displays the real (wall clock), the system CPU, and the user CPU times which elapsed during execution of the command, plus other fields in the rusage structure, all on one long line. Times are reported in seconds and hundredths of a second.

EXAMPLES

Example 1 The format of rusage output

The example below shows the format of rusage output.

example% rusage wc /usr/share/man/man1/csh (1)
3045 13423 78071 /usr/share/man/man1/csh (1)
2.26 real 0.80 user 0.36 sys 11 pf 38 pr 0 sw 11 rb 0 wb 16 vcx 37
 icx 24 mx 0 ix 1230 id 9 is
example%

Each of the fields identified corresponds to an element of the rusage structure, as described in getrusage(3C), as follows:

realelapsed real time
userru_utimeuser time used
sysru_stimesystem time used
pfru_majfltpage faults requiring physical I/O
prru_minfltpage faults not requiring physical I/O
swru_nswapswaps
rbru_inblockblock input operations
wbru_oublockblock output operations
vcxru_nvcswvoluntary context switches
icxru_nivcswinvoluntary context switches
mxru_maxrssmaximum resident set size
ixru_ixrsscurrently 0
idru_idrssintegral resident set size
isru_isrsscurrently 0
SEE ALSO

csh(1), time(1), getrusage(3C), attributes(5)

BUGS

When the command being timed is interrupted, the timing values displayed may be inaccurate.