time command

Guy Harris guy at auspex.UUCP
Wed Jul 4 10:54:58 AEST 1990


>>>I've not run across a reasonable description of
>>>the output of the time command in unix doc that
>>>I've seen.  What do these numbers mean? In general,
>>>what do they say about an application?
>>>
>>>e.g., 46.6u 1.8s 0:50 96% 0+1716k 5+0io 13pf+0w
>>
>>I would like to know the answer, too.
>
>The ``time'' shell builtin typically returns the contents of the tms
>structure.

Hrrumph.  The *Bourne* shell "time" shell builtin typically returns the
contents of the "tms" structure.  The *C* shell "time" builtin, which is
what his output looks like, selects various bits from the "struct
rusage" structure (what, you don't have such a structure on your system?
Not all UNIXes necessarily look exactly like yours...).

Here's a description from the SunOS 4.0.3 C shell manual page.  This
describes the format of the "time" shell variable, which controls the
output format of the "time" command:

     time              Control automatic timing of commands.  Can
                       be  supplied  with one or two values.  The
                       first is the reporting  threshold  in  CPU
                       seconds.  The  second  is a string of tags
                       and text  indicating  which  resources  to
                       report  on.   A  tag is a percent sign (%)
                       followed by  a  single  upper-case  letter
                       (unrecognized tags print as text):

                            %D   Average amount of unshared  data
                                 space used in Kilobytes.
                            %E   Elapsed (wallclock) time for the
                                 command.
                            %F   Page faults.
                            %I   Number  of  block  input  opera-
                                 tions.
                            %K   Average amount of unshared stack
                                 space used in Kilobytes.
                            %M   Maximum real memory used  during
                                 execution of the process.
                            %O   Number of  block  output  opera-
                                 tions.
                            %P   Total CPU time - U (user) plus S
                                 (system)  - as a percentage of E
                                 (elapsed) time.
                            %S   Number of seconds  of  CPU  time
                                 consumed by the kernel on behalf
                                 of the user's process.
                            %U   Number of seconds  of  CPU  time
                                 devoted to the user's process.
                            %W   Number of swaps.
                            %X   Average amount of shared  memory
                                 used in Kilobytes.

                       The default summary display  outputs  from
                       the %U, %S, %E, %P, %X, %D, %I, %O, %F and
                       %W tags, in that order.



More information about the Comp.unix mailing list