bash builtin: times
| GNU version |
time [options] command [arguments…]
Runs command arguments , then writes a message to standard error including:
tms_utime + tms_cutime )
tms_stime + tms_cstime )
5.6 wall 0.127 user 0.571 sys 12.45%
-p When in the POSIX locale, use format:
real %f\nuser %f\nsys %f\n
(in seconds) with the number of decimals in the output
sufficient to express the clock tick accuracy plus 1.
real 0.88
user 0.12
sys 0.32
LANG, LC_ALL, LC_CTYPE, LC_MESSAGES and LC_NUMERIC are used for formatting the output and NLSPATH and PATH to search for command.
command. if command was invoked. command could not be found, command found but could not be invoked, command.
times
STDOUT†
time used, memory, I/O and IPC calls (where available). -f or the TIME environment variable.
The default format string is
%Uuser %Ssystem %Eelapsed %PCPU
(%Xtext+%Ddata %Mmax)k
%Iinputs+%Ooutputs
(%Fmajor+%%Rminor)pagefaults
%Wswaps
Command exited with non-zero status 1 0.45user 0.04system 0:00.50elapsed 98%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+180minor)pagefaults 0swaps
In the format, ordinary characters are copied, for tab, newline and backslash
use \t, \n and \\, for a percent sign use %%, and % indicates a conversion.
Output includes a trailing newline
options in italics are not available is tsch
Time
%E Elapsed real time (in [hours:]minutes:seconds).
%e Elapsed real time (in seconds).
%S Total number of CPU-seconds spent in kernel mode.
%U Total number of CPU-seconds spent in user mode.
%P Percentage of the CPU, computed as (%U + %S) / %E.
Memory
%M Maximum resident set size in Kbytes.
%t Average resident set size in Kbytes.
%K Average total (data+stack+text) memory use in Kbytes.
%D Average size of the unshared data area, in Kbytes.
%p Average size of the unshared stack space, in Kbytes.
%X Average size of the shared text space, in Kbytes.
%F page faults where the page was read in from disk.
%R page faults that are not valid but which have not yet been claimed by other virtual pages.
the data in the page is still valid but the system tables must be updated.
%W swapped out of main memory.
%c context-switched involuntarily (because the time slice expired).
%w waits: times that the program was context-switched voluntarily,
for instance while waiting for an I/O operation to complete.
I/O
%I file system inputs
%O file system outputs
%r socket messages received
%s socket messages sent
%k signals delivered to the process.
%C command and arguments
%x Exit status of the command.
%Z System's page size, in bytes. per-system constant
-f FORMAT | |||||||||||||||||||||||
TIME was poorly chosen.autoconf or make to use environment variables with the name of a utility to override the utility to be used.
Uses like MORE or TIME for options to programs (instead of program pathnames) tend to lead to difficulties.
It seems unfortunate that -o overwrites instead of appends. (That is, the -a option should be the default.)
Mail suggestions and bug reports for GNU time to bug-utils@prep.ai.mit.edu
Please include the version of time, which you can get by running time --version
and the operating system and C compiler you used.
stdout the user and system times used by the shell and its children since being invoked.
ex:
0m0.060s 0m0.260s
0m1.250s 0m2.240s
The return status is 0.