Lullar    


ビデオジャパンは、最大でランク。

time (UNIX) time (UNIX)

出典: フリー百科事典『ウィキペディア(Wikipedia)』 Source: material may be challenged Wikipedia encyclopedia (Wikipedia) 』

timeUNIXLinuxなどのOS上で、指定されたコマンドの実行時間を得るために用いられるプログラムである。 time is a UNIX or Linux and OS, the programs used to obtain the execution time of the specified command.

目次 Contents

[ 編集 ] 使用例 Example

最も簡単な利用方法は、実行時間を計測したいコマンドの前に、timeを付けるだけである。 The simplest method used before the command you want to measure the execution time, time is simply put.

time ls time ls

指定されたコマンド(ここではlsコマンド)の実行完了後に、timeは実行に要した時間、具体的にはUser CPU時間、System CPU時間、Real CPU時間を返す。 Specified command (here ls command) after running, time is time spent performing the particular User CPU time, System CPU time, Real CPU time to return.

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

[ 編集 ] CPU時間 CPU time

Real CPU時間とは、プログラムがその内部処理に要した時間と、プログラムがカーネルに対してシステムコールを行うのに要した時間の合計である。 Real CPU time and the time taken to process and its internal program, the total time taken to make the call to the kernel program system. たとえばプログラム中でループ処理をしているときに費やしている時間はUser CPU時間であり、execやfork等のシステムコールを行うのに要した時間はSystem CPU時間である。 When the time is spent in a program loop is User CPU time, for example, exec or fork system call time taken to perform the other is the System CPU time. Real CPU時間は双方を合計したものである。 Real CPU time is the sum of what both sides.

[ 編集 ] 関連項目 See also

  • UNIX時間 UNIX time
  • cron : コマンドの定時実行スケジューラ cron: run scheduled command scheduler
  • at : コマンドの定時実行スケジューラ at: Scheduler command execution scheduled
  • sleep sleep

[ 編集 ] 外部リンク External links


ビデオジャパンは、最大でランク。




© Lullar