Welcome to Linux Knowledge Base and Tutorial
"The place where you learn linux"

 Create an AccountHome | Submit News | Your Account  

Tutorial Menu
Linux Tutorial Home
Table of Contents

· Introduction to Operating Systems
· Linux Basics
· Working with the System
· Shells and Utilities
· Editing Files
· Basic Administration
· The Operating System
· The X Windowing System
· The Computer Itself
· Networking
· System Monitoring
· Solving Problems
· Security
· Installing and Upgrading
· Linux and Windows

Glossary
MoreInfo
Man Pages
Linux Topics
Test Your Knowledge

Site Menu
Site Map
FAQ
Copyright Info
Terms of Use
Privacy Info
Disclaimer
WorkBoard
Thanks
Donations
Advertising
Masthead / Impressum
Your Account

Communication
Feedback
Forums
Private Messages
Surveys

Features
HOWTOs
News Archive
Submit News
Topics
User Articles
Web Links

Google
Google


The Web
linux-tutorial.info

Who's Online
There are currently, 158 guest(s) and 0 member(s) that are online.

You are an Anonymous user. You can register for free by clicking here

  

time



SYNOPSIS

       time [options] command [arguments...]


DESCRIPTION

       The  time  command runs the specified program command with
       the given arguments.  When command finishes, time writes a
       message  to standard output giving timing statistics about
       this program run.  These statistics  consist  of  (i)  the
       elapsed real time between invocation and termination, (ii)
       the user CPU time (the sum of the tms_utime and tms_cutime
       values in a struct tms as returned by times(2)), and (iii)
       the  system  CPU  time  (the  sum  of  the  tms_stime  and
       tms_cstime   values   in  a  struct  tms  as  returned  by
       times(2)).


OPTION

       -p     When in the POSIX locale, use  the  precise  tradi­
              tional format
                   "real %f\nuser %f\nsys %f\n"
              (with numbers in seconds) where the number of deci­
              mals in the output for %f  is  unspecified  but  is
              sufficient  to express the clock tick accuracy, and
              at least one.


ENVIRONMENT

       The  variables  LANG,   LC_ALL,   LC_CTYPE,   LC_MESSAGES,
       LC_NUMERIC,  NLSPATH  and  PATH  are used. The last one to
       search for command.  The remaining ones for the  text  and
       formatting of the output.


EXIT STATUS

       If  command  was  invoked, the exit status is that of com­
       mand.  Otherwise it is 127 if command could not be  found,
       126  if  it  could  be found but could not be invoked, and
       some other nonzero value (1-125) if  something  else  went
       wrong.


SEE ALSO

       times(2),


GNU VERSION

       Below  a description of the GNU 1.7 version of time.  Dis­
       regarding the name of the utility,  GNU  makes  it  output
       lots  of useful information, not only about time used, but
       also on other resources like memory,  I/O  and  IPC  calls
       (where available).  The output is formatted using a format
       string that can be specified using the -f  option  or  the
       TIME environment variable.

       The default format string is
       sion.  The program time will always add a trailing newline
       itself.  The conversions follow.  All  of  those  used  by
       tcsh(1) are supported.

       Time

       %E     Elapsed real time (in [hours:]minutes:seconds).

       %e     (Not in tcsh.) Elapsed real time (in seconds).

       %S     Total  number of CPU-seconds that the process spent
              in kernel mode.

       %U     Total number of CPU-seconds that the process  spent
              in user mode.

       %P     Percentage  of  the CPU that this job got, computed
              as (%U + %S) / %E.

       Memory

       %M     Maximum resident set size of the process during its
              lifetime, in Kbytes.

       %t     (Not  in  tcsh.)  Average  resident set size of the
              process, in Kbytes.

       %K     Average total (data+stack+text) memory use  of  the
              process, in Kbytes.

       %D     Average  size  of the process's unshared data area,
              in Kbytes.

       %p     (Not  in  tcsh.)  Average  size  of  the  process's
              unshared stack space, in Kbytes.

       %X     Average size of the process's shared text space, in
              Kbytes.

       %Z     (Not in tcsh.) System's page size, in bytes.   This
              is  a  per-system constant, but varies between sys­
              tems.

       %F     Number of major page faults that occurred while the
              process  was  running.   These are faults where the
              page has to be read in from disk.

       %R     Number  of  minor,  or  recoverable,  page  faults.
              These  are  faults for pages that are not valid but
              which have not yet been claimed  by  other  virtual
              pages.   Thus  the  data in the page is still valid
              but the system tables must be updated.

       %O     Number of file system outputs by the process.

       %r     Number of socket messages received by the  process.

       %s     Number of socket messages sent by the process.

       %k     Number of signals delivered to the process.

       %C     (Not  in  tcsh.) Name and command line arguments of
              the command being timed.

       %x     (Not in tcsh.) Exit status of the command.


GNU OPTIONS

       -f FORMAT, --format=FORMAT
              Specify output format, possibly overriding the for­
              mat specified in the environment variable TIME.

       -p, --portability
              Use the portable output format.

       -o FILE, --output=FILE
              Do  not  send  the results to stderr, but overwrite
              the specified file.

       -a, --append
              (Used together  with  -o.)  Do  not  overwrite  but
              append.

       -v, --verbose
              Give  very  verbose  output  about  all the program
              knows about.


GNU STANDARD OPTIONS

       --help Print a usage message on standard output  and  exit
              successfully.

       -V, --version
              Print  version information on standard output, then
              exit successfully.

       --     Terminate option list.


BUGS

       Not all resources are measured by all versions of Unix, so
       some of the values might be reported as zero.  The present
       selection was mostly inspired by the data provided by  4.2
       or 4.3BSD.

       GNU  time version 1.7 is not yet localized.  Thus, it does
       not implement the POSIX requirements.
       running
       time --version
       and the operating system and C compiler you used.


SEE ALSO

       tcsh(1), times(2), wait3(2)


AUTHORS

       David Keppel
              Original version

       David MacKenzie
              POSIXization, autoconfiscation, GNU getopti­
              zation,  documentation,  other bug fixes and
              improvements.

       Arne Henrik Juul
              Helped with portability

       Francois Pinard
              Helped with portability

                            2000-12-11                    TIME(1)
  

The Linux Tutorial is always looking for new contributors.


Login
Nickname

Password

Security Code
Security Code
Type Security Code


Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Help if you can!


Amazon Wish List

Did You Know?
You can choose larger fonts by selecting a different themes.


Friends



Tell a Friend About Us

Bookmark and Share



Web site powered by PHP-Nuke

Is this information useful? At the very least you can help by spreading the word to your favorite newsgroups, mailing lists and forums.
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Articles are the property of their respective owners. Unless otherwise stated in the body of the article, article content (C) 1994-2013 by James Mohr. All rights reserved. The stylized page/paper, as well as the terms "The Linux Tutorial", "The Linux Server Tutorial", "The Linux Knowledge Base and Tutorial" and "The place where you learn Linux" are service marks of James Mohr. All rights reserved.
The Linux Knowledge Base and Tutorial may contain links to sites on the Internet, which are owned and operated by third parties. The Linux Tutorial is not responsible for the content of any such third-party site. By viewing/utilizing this web site, you have agreed to our disclaimer, terms of use and privacy policy. Use of automated download software ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and are therefore expressly prohibited. For more details on this, take a look here

PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.05 Seconds