q Dq real , the CPU time spent executing .Ar command at user level
q Dq user , and the CPU time spent executing in the operating system kernel
q Dq sys , to the standard error stream. Times are reported in seconds.
p Available options: l -tag -width Ds t Fl c Displays information in the format used by default the .Nm builtin of .Xr csh 1 uses (%Uu %Ss %E %P %X+%Dk %I+%Oio %Fpf+%Ww). t Fl f Specify a time format using the .Xr csh 1 .Nm builtin syntax. The following sequences may be used in the format string:
p l -tag -width 4n -compact t %U The time the process spent in user mode in cpu seconds. t %S The time the process spent in kernel mode in cpu seconds. t %E The elapsed (wall clock) time in seconds. t %P The CPU percentage computed as (%U + %S) / %E. t %W Number of times the process was swapped. t %X The average amount in (shared) text space used in Kbytes. t %D The average amount in (unshared) data/stack space used in Kbytes. t %K The total space used (%X + %D) in Kbytes. t %M The maximum memory the process had in use at any time in Kbytes. t %F The number of major page faults (page needed to be brought from disk). t %R The number of minor page faults. t %I The number of input operations. t %O The number of output operations. t %r The number of socket messages received. t %s The number of socket messages sent. t %k The number of signals received. t %w The number of voluntary context switches (waits). t %c The number of involuntary context switches. .El t Fl l Lists resource utilization information. The contents of the .Ar command process's .Em rusage structure are printed; see below. t Fl p The output is formatted as specified by .St -p1003.2-92 . t Fl t Displays information in the format used by default the .Nm builtin of .Xr tcsh 1 uses (%Uu %Ss %E %P\\t%X+%Dk %I+%Oio %Fpf+%Ww) with three decimal places for time values. .El
p Some shells, such as .Xr csh 1 and .Xr ksh 1 , have their own and syntactically different built-in version of .Nm . The utility described here is available as
a /usr/bin/time to users of these shells. .Ss Resource Utilization If the .Fl l option is given, the following resource usage information is displayed in addition to the timing information: l -item -offset indent -compact t maximum resident set size t average shared memory size t average unshared data size t average unshared stack size t page reclaims t page faults t swaps t block input operations t block output operations t messages sent t messages received t signals received t voluntary context switches t involuntary context switches .El Resource usage is the total for the execution of .Ar command and any child processes it spawns, as per .Xr wait4 2 . .Sh FILES l -tag -width Xsys/resource.hX -compact t Aq sys/resource.h .El .Sh EXIT STATUS The .Nm utility exits with one of the following values: l -tag -width indent t 1-125 An error occurred in the .Nm utility. t 126 The .Ar command was found but could not be invoked. t 127 The .Ar command could not be found. .El
p Otherwise, the exit status of .Nm will be that of .Ar command . .Sh SEE ALSO .Xr csh 1 , .Xr ksh 1 , .Xr clock_gettime 2 , .Xr getrusage 2 , .Xr wait4 2 .Sh STANDARDS The .Nm utility conforms to .St -p1003.2-92 . .Sh BUGS The granularity of seconds on microprocessors is crude and can result in times being reported for CPU usage which are too large by a second.