Zum Inhalt springen

Time: Unterschied zwischen den Versionen

Aus Foxwiki
Keine Bearbeitungszusammenfassung
K Textersetzung - „ “ durch „ “
 
Zeile 6: Zeile 6:
  Run COMMAND, then print system resource usage.
  Run COMMAND, then print system resource usage.
   
   
  -a, --append             with -o FILE, append instead of overwriting
  -a, --append       with -o FILE, append instead of overwriting
  -f, --format=FORMAT       use the specified FORMAT instead of the default
  -f, --format=FORMAT   use the specified FORMAT instead of the default
  -o, --output=FILE         write to FILE instead of STDERR
  -o, --output=FILE     write to FILE instead of STDERR
  -p, --portability         print POSIX standard 1003.2 conformant string:
  -p, --portability     print POSIX standard 1003.2 conformant string:
  real %%e
  real %%e
  user %%U
  user %%U
  sys %%S
  sys %%S
  -q, --quiet               do not print information about abnormal program
  -q, --quiet       do not print information about abnormal program
  termination (non-zero exit codes or signals)
  termination (non-zero exit codes or signals)
  -v, --verbose             print all resource usage information instead of
  -v, --verbose       print all resource usage information instead of
  the default format
  the default format
  -h, --help               display this help and exit
  -h, --help       display this help and exit
  -V, --version           output version information and exit
  -V, --version     output version information and exit
   
   
  Commonly usaged format sequences for -f/--format:
  Commonly usaged format sequences for -f/--format:
  (see documentation for full list)
  (see documentation for full list)
  %%   a literal '%'
  %% a literal '%'
  %C   command line and arguments
  %C command line and arguments
  %c   involuntary context switches
  %c involuntary context switches
  %E   elapsed real time (wall clock) in [hour:]min:sec
  %E elapsed real time (wall clock) in [hour:]min:sec
  %e   elapsed real time (wall clock) in seconds
  %e elapsed real time (wall clock) in seconds
  %F   major page faults
  %F major page faults
  %M   maximum resident set size in KB
  %M maximum resident set size in KB
  %P   percent of CPU this job got
  %P percent of CPU this job got
  %R   minor page faults
  %R minor page faults
  %S   system (kernel) time in seconds
  %S system (kernel) time in seconds
  %U   user time in seconds
  %U user time in seconds
  %w   voluntary context switches
  %w voluntary context switches
  %x   exit status of command
  %x exit status of command
   
   
  Default output format:
  Default output format:
Zeile 41: Zeile 41:
   
   
  NOTE: your shell may have its own version of time, which usually supersedes
  NOTE: your shell may have its own version of time, which usually supersedes
  the version described here. Please refer to your shell's documentation
  the version described here. Please refer to your shell's documentation
  for details about the options it supports.
  for details about the options it supports.
   
   
Zeile 56: Zeile 56:
   
   
  Options:
  Options:
  -p       print the timing summary in the portable Posix format
  -p   print the timing summary in the portable Posix format
   
   
  The value of the TIMEFORMAT variable is used as the output format.
  The value of the TIMEFORMAT variable is used as the output format.
Zeile 65: Zeile 65:
  $ '''whereis time'''
  $ '''whereis time'''
  time:  
  time:  
  /usr/bin/time /usr/share/man/man7/time.7.gz  
/usr/bin/time /usr/share/man/man7/time.7.gz  
  /usr/share/man/man2/time.2.gz  
/usr/share/man/man2/time.2.gz  
  /usr/share/man/man1/time.1.gz  
/usr/share/man/man1/time.1.gz  
  /usr/share/man/man3/time.3am.gz  
/usr/share/man/man3/time.3am.gz  
  /usr/share/info/time.info.gz
/usr/share/info/time.info.gz


  $ '''type time'''
  $ '''type time'''
Zeile 75: Zeile 75:


  $ '''whatis time'''
  $ '''whatis time'''
  time (1)             - run programs and summarize system resource usage
  time (1)       - run programs and summarize system resource usage
  time (2)             - get time in seconds
  time (2)       - get time in seconds
  time (3am)           - time functions for gawk
  time (3am)     - time functions for gawk
  time (7)             - overview of time and timers
  time (7)       - overview of time and timers


[[Kategorie:Linux/Zeit]]
[[Kategorie:Linux/Zeit]]

Aktuelle Version vom 14. Juni 2026, 00:44 Uhr


$ /usr/bin/time --help
Usage: /usr/bin/time [OPTIONS] COMMAND [ARG]...
Run COMMAND, then print system resource usage.

-a, --append       with -o FILE, append instead of overwriting
-f, --format=FORMAT    use the specified FORMAT instead of the default
-o, --output=FILE     write to FILE instead of STDERR
-p, --portability     print POSIX standard 1003.2 conformant string:
real %%e
user %%U
sys %%S
-q, --quiet        do not print information about abnormal program
termination (non-zero exit codes or signals)
-v, --verbose       print all resource usage information instead of
the default format
-h, --help        display this help and exit
-V, --version      output version information and exit

Commonly usaged format sequences for -f/--format:
(see documentation for full list)
%%  a literal '%'
%C  command line and arguments
%c  involuntary context switches
%E  elapsed real time (wall clock) in [hour:]min:sec
%e  elapsed real time (wall clock) in seconds
%F  major page faults
%M  maximum resident set size in KB
%P  percent of CPU this job got
%R  minor page faults
%S  system (kernel) time in seconds
%U  user time in seconds
%w  voluntary context switches
%x  exit status of command

Default output format:
%Uuser %Ssystem %Eelapsed %PCPU (%Xavgtext+%Davgdata %Mmaxresident)k
%Iinputs+%Ooutputs (%Fmajor+%Rminor)pagefaults %Wswaps

NOTE: your shell may have its own version of time, which usually supersedes
the version described here. Please refer to your shell's documentation
for details about the options it supports.

GNU Time website: <https://www.gnu.org/software/time/>
Full documentation at: <https://www.gnu.org/software/time/manual>
E-mail bug reports to: bug-time@gnu.org
$ help time
time: time [-p] Pipeline
Report time consumed by pipeline's execution.

Execute PIPELINE and print a summary of the real time, user CPU time,
and system CPU time spent executing PIPELINE when it terminates.

Options:
-p    print the timing summary in the portable Posix format

The value of the TIMEFORMAT variable is used as the output format.

Exit Status:
The return status is the return status of PIPELINE.
$ whereis time
time: 
/usr/bin/time /usr/share/man/man7/time.7.gz 
/usr/share/man/man2/time.2.gz 
/usr/share/man/man1/time.1.gz 
/usr/share/man/man3/time.3am.gz 
/usr/share/info/time.info.gz
$ type time
time Ist ein reserviertes Schlüsselwort der Shell.
$ whatis time
time (1)       - run programs and summarize system resource usage
time (2)       - get time in seconds
time (3am)      - time functions for gawk
time (7)       - overview of time and timers