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 (Note: Setting Format), or have
`time' save the information in a file instead of displaying it on the
screen (Note: 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 (Note: 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
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
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
`email@example.com'. Please include the version of `time',
which you can get by running `time --version', and the operating system
and C compiler you used.
- Setting Format
- Selecting the information reported by `time'.
- Format String
- The information `time' can report.
- Writing the information to a file.
- Examples of using `time'.
- Limitations on the accuracy of `time' output.
- Invoking time
- Summary of the options to the `time' command.
automatically generated by info2www version 220.127.116.11