timex — time a command; report process data and system activity
reports in seconds the elapsed time, user time,
and system time spent in execution of the given
Optionally, process accounting data for
and all its children can be listed or summarized,
and total system activity during the execution interval can be reported.
The output of
is written on the standard error. Timex returns an exit status of 1 if it
is used incorrectly, if it is unable to fork, or if it could not exec
command . Otherwise, timex returns the exit status of command.
Report the total number of blocks read or written and
total characters transferred by
and all its children. This option works only if the process accounting
software is installed.
List process accounting records for
and all its children.
modify the data items reported.
They behave as defined in
The number of blocks read or written
and the number of characters transferred are always reported.
This option works only if the process accounting software is installed
has been invoked to create
Report total system activity (not just that due to
that occurred during the execution interval of
All the data items listed in
A simple example:
A terminal session of arbitrary complexity
can be measured by timing a sub-shell:
timex -opskmt sh
Process records associated with
are selected from the accounting file
by inference, since process genealogy is not available.
Background processes having the same user-ID,
and execution time window are spuriously included.
timex: SVID2, SVID3