🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix
Article #115

Re: time command

#115
From: Guy Harris
Date: Wed, 04 Jul 1990 00:54
59 lines
3531 bytes
>>>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.
Technical Details
Message-ID: <3648@zorba.Tynan.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!mips!zorba!dtynan
References: <3556@zorba.Tynan.COM> <3570@zorba.Tynan.COM> <3615@zorba.Tynan.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!mips!zorba!dtynan
From: guy@auspex.UUCP (Guy Harris)
Newsgroups: comp.unix
Subject: Re: time command
Message-ID: <3648@zorba.Tynan.COM>
Date: 4 Jul 90 00:54:58 GMT
References: <3556@zorba.Tynan.COM> <3570@zorba.Tynan.COM> <3615@zorba.Tynan.COM>
Sender: dtynan@zorba.Tynan.COM
Organization: Auspex Systems, Santa Clara
Lines: 59
Approved: dtynan@zorba.Tynan.COM