time: Resource Measurement
1 Measuring Program Resource Use
********************************
The 'time' command runs another program, then displays information about
the resources used by that program, collected by the system while the
program was running. You can select which information is reported and
the format in which it is shown (⇒Setting Format), or have 'time'
save the information in a file instead of displaying it on the screen
(⇒Redirecting).
The resources that 'time' can report on fall into the general
categories of time, memory, and I/O and IPC calls. Some systems do not
provide much information about program resource use; 'time' reports
unavailable information as zero values (⇒Accuracy).
The format of the 'time' command is:
time [option...] COMMAND [ARG...]
'time' runs the program COMMAND, with any given arguments ARG....
When COMMAND finishes, 'time' displays information about resources used
by COMMAND.
Here is an example of using 'time' to measure the time and other
resources used by running the program 'grep':
eg$ time grep nobody /etc/aliases
nobody:/dev/null
etc-files:nobody
misc-group:nobody
0.07user 0.50system 0:06.69elapsed 8%CPU (0avgtext+489avgdata 324maxresident)k
46inputs+7outputs (43major+251minor)pagefaults 0swaps
Mail suggestions and bug reports for GNU 'time' to
'bug-time@gnu.org'. Please include the version of 'time', which you can
get by running 'time --version', and the operating system and C compiler
you used.
Menu