Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

times - write process times

&pagelevel(4)&pagelevel

The built-in times command in the POSIX shell sh outputs the total time consumed by the processes which the shell has started so far. The time required for child processes is also output.

The time is subdivided into shell user time and system time (1st line) and child process user time and system time (2nd line). The time is specified in minutes (m) and seconds (s).

The user time is the time which has elapsed during the user phase of processes, while the system time is the time which has elapsed during the system phase.

Use time if you want to know the time consumed by a particular command.


Syntax


times



Locale

The following environment variables affect the execution of times:

LANG

Provide a default value for the internationalization variables that are unset or null. If LANG is unset of null, the corresponding value from the implementation-specific default locale will be used. If any of the internationalization variables contains an invalid setting, the utility will behave as if none of the variables had been defined.

LC_ALL

If set to a non-empty string value, override the values of all the other internationalization variables.

LC_CTYPE

Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single- as opposed to multi-byte characters in arguments and input files), the classification of characters as upper- to lower-case, and the mapping of characters from one case to the other.

LC_MESSAGES

Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error.

NLSPATH

Determine the location of message catalogs for the processing of LC_MESSAGES.

Example

Finding out the accumulated user and system times of all processes run from the current shell:

$ times

0m8.68s 0m2.5s

0m22.74s 0m10.14s

In the shell user phase, the processes have taken 8.68 seconds and in the shell system phase 2.5 seconds. The child user phase has so far taken 22.74 seconds and the child system phase 10.14 seconds.

See also

times
time(), times() [4]