
476
|
Chapter 3: Linux Commands
This is the Title of the Book, eMatter Edition
Copyright © 2006 O’Reilly & Associates, Inc. All rights reserved.
Resources
The following resources can be specified in format strings:
c Number of involuntary context switches because of time slice
expiring.
C Name and arguments of command being timed.
D Average size of unshared data area, in kilobytes.
e Elapsed real time, in seconds.
E Elapsed real time as hours:minutes:seconds.
F Number of major (I/O-requiring) page faults.
I Number of filesystem inputs.
k Number of signals delivered to the process.
K Average total (data+stack+text) memory use, in kilobytes.
M Maximum resident set size, in kilobytes.
O Number of filesystem outputs.
p Average unshared stack size, in kilobytes.
P Percent of CPU used.
r Number of socket messages received.
R Number of minor (recoverable) page faults.
s Number of socket messages sent.
S Total CPU seconds used by the system on behalf of the
process.
t Average resident set size, in kilobytes.
U Total CPU seconds used directly by the process.
w Number of voluntary context switches.
W Number of times the process was swapped out of main
memory.
x Exit status of the command.
X Average shared text size, in kilobytes.
Z System page size, in bytes.
Example
Time the execution of the command ls -l and display the user time,
system time, and exit status of the command:
/usr/bin/time -f "\t%U user,\t%S system,\t%x status" ...