Time (Unix)

Time (Unix)

time is a command in the Unix operating systems. It is used to determine the duration of execution of a particular command.

Usage

To use the command, simply precede any command by the word time, such as:

time ls

When the command completes, time will report how long it took to execute the ls command in terms of user CPU time, system CPU time, and real time. The output format varies between different versions of the command, and some give additional statistics, as in this example:

$ time host wikipedia.org wikipedia.org has address 207.142.131.235 0.000u 0.000s 0:00.17 0.0% 0+0k 0+0io 0pf+0w $

time(1) can exist as a standalone program (such as GNU time) or as a shell builtin (e.g. in tcsh or in zsh).

User Time vs System Time

The term 'user CPU time' can be a bit misleading at first. To be clear the total time ("real CPU time"), is the combination of the amount of time the CPU spends performing some action for a program and the amount of time the CPU spends performing system calls for the kernel on the program's behalf. When a program loops through an array, it is accumulating user CPU time. Conversely, when a program executes a system call such as exec or fork, it is accumulating system CPU time.

Method of operation

According to the source code of the GNU implementation of time, most information shown by time is derived from the wait3 system call. On systems that do not have a wait3 call that returns status information, the times system call is used instead.

See also

*List of Unix programs
*System time
*Unix time
*Cron process for scheduling jobs to run at a particular time.

References

*man|cu|time|SUS|time a simple command
*man|1|time|Linux|time a simple command or give resource usage


Wikimedia Foundation. 2010.

Игры ⚽ Поможем сделать НИР

Look at other dictionaries:

  • Time (Unix) — Эта статья об утилите; о формате кодирования времени см.: UNIX время. У этого термина существуют и другие значения, см. Time. time unix утилита, возвращающая время выполнения простой команды или получение подсказки по ресурсу. Когда команда… …   Википедия

  • time (Unix) — Эта статья об утилите; о формате кодирования времени см.: UNIX время. У этого термина существуют и другие значения, см. Time (значения). time unix утилита, возвращающая время выполнения простой команды или получение подсказки по ресурсу. Когда… …   Википедия

  • Time (Unix) — time ist ein Kommando auf Unix Betriebssystemen. Es wird dazu verwendet, um die Ausführungsdauer eines bestimmten anderen Kommandos zu messen. Um es zu benutzen wird das Wort time einfach vor das zu messende Kommando gestellt. Ein Beispiel ist:… …   Deutsch Wikipedia

  • time (Unix) — time ist ein Kommando auf Unix Betriebssystemen. Es wird dazu verwendet, um die Ausführungsdauer eines bestimmten anderen Kommandos zu messen. Um es zu benutzen wird das Wort time einfach vor das zu messende Kommando gestellt. Ein Beispiel ist:… …   Deutsch Wikipedia

  • Time (disambiguation) — Time is a common term for the experience of duration, and a fundamental quantity of measuring systems.Time may also refer to: Books and magazines * Time (magazine) * , a novel by Stephen Baxter Film and television * Time (film) * Time (TV series) …   Wikipedia

  • Time (Begriffsklärung) — Time steht für: Time, ein US amerikanisches Magazin Time Inc., ein US amerikanisches Verlagsunternehmen, das unter anderem das vorgenannte Magazin herausgibt Time (Norwegen), eine Kommune in Norwegen Time (Band), eine jugoslawische Rock Gruppe… …   Deutsch Wikipedia

  • Time (значения) — Time (рус. время): Time  американский новостной журнал. Time  рассказ Уильяма Берроуза. time  unix утилита, возвращающая время выполнения простой команды или получение подсказки по ресурсу. Time Inc.  крупный издатель журналов …   Википедия

  • Time t — The time t datatype is a data type in the ISO C library defined for storing system time values. Such values are returned from the standard time() library function. This type is a typedef defined in the standard lt;time.h gt; header. ISO C defines …   Wikipedia

  • Unix time — Эта статья о формате кодирования времени; об утилите см.: time (Unix). UNIX время или POSIX время (англ. Unix time)  способ кодирования времени, принятый в POSIX совместимых операционных системах. Моментом начала отсчёта считается полночь (по… …   Википедия

  • UNIX time — Эта статья о формате кодирования времени; об утилите см.: time (Unix). UNIX время или POSIX время (англ. Unix time)  способ кодирования времени, принятый в POSIX совместимых операционных системах. Моментом начала отсчёта считается полночь (по… …   Википедия

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”