1 .\" Copyright Andries Brouwer, 2000
3 .\" This page is distributed under GPL.
4 .\" Some fragments of text came from the time-1.7 info file.
5 .\" Inspired by kromJx@crosswinds.net.
7 .\" Japanese Version Copyright (c) 2008 Akihiro MOTOKI
8 .\" all rights reserved.
9 .\" Translated 2008-11-20, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.13
11 .TH TIME 1 2008-11-14 "" "Linux User's Manual"
14 .\"O time \- time a simple command or give resource usage
15 time \- コマンドの時間計測やリソース使用量を表示する
18 .BI "time [" options "] " command " [" arguments... "] "
23 .\"O command runs the specified program
25 .\"O with the given arguments.
34 .\"O writes a message to standard error giving timing statistics
35 .\"O about this program run.
39 はこのプログラムの実行時間の統計情報についてのメッセージを
41 .\"O These statistics consist of (i) the elapsed real time
42 .\"O between invocation and termination, (ii) the user CPU time
51 .\"O and (iii) the system CPU time (the sum of the
59 表示される統計情報は以下の三つから構成される:
60 (i) 起動から終了までに経過した実時間 (real time)、
80 .\"O Note: some shells (e.g.,
84 .\"O command that provides less functionality than the command described here.
85 .\"O To access the real command, you may need to specify its pathname
87 .\"O .IR /usr/bin/time ).
89 などの) いくつかのシェルには、ここで説明するコマンドよりも
93 組み込みではない実際のコマンドを使用するためには、
95 のような) コマンドのパス名を指定する必要があるかもしれない。
100 .\"O When in the POSIX locale, use the precise traditional format
103 .\"O "real %f\enuser %f\ensys %f\en"
106 .\"O (with numbers in seconds)
107 .\"O where the number of decimals in the output for %f is unspecified
108 .\"O but is sufficient to express the clock tick accuracy, and at least one.
109 POSIX ロケールの場合、伝統的なフォーマットである
111 "real %f\enuser %f\ensys %f\en"
114 %f の出力での小数点以下の桁数は規定されていないが、
115 クロック・ティック (clock tick) の精度を表すのに十分な桁数となり、
117 .\"O .SH "EXIT STATUS"
121 .\"O was invoked, the exit status is that of
123 .\"O Otherwise it is 127 if
125 .\"O could not be found, 126 if it could be found but could not be invoked,
126 .\"O and some other nonzero value (1-125) if something else went wrong.
132 が見つからなかった場合は終了ステータスは 127 で、
134 が見つかったが起動できなかった場合は 126 となる。
135 これ以外で何かエラーがあった場合は、終了ステータスは
136 0 以外の前記以外の値 (1-125) の何かになる。
143 .\"O .BR LC_MESSAGES ,
144 .\"O .BR LC_NUMERIC ,
158 .\"O The last one to search for
160 .\"O The remaining ones for the text and formatting of the output.
164 を探すのに使われる。それ以外は出力文字や書式に使用される。
165 .\"O .SH "GNU VERSION"
167 .\"O Below a description of the GNU 1.7 version of
169 .\"O Disregarding the name of the utility, GNU makes it output lots of
170 .\"O useful information, not only about time used, but also on other
171 .\"O resources like memory, I/O and IPC calls (where available).
172 .\"O The output is formatted using a format string that can be specified
173 .\"O using the \-f option or the
175 .\"O environment variable.
178 の説明である。コマンド名とは裏腹に、GNU バージョンでは
179 有益な情報がたくさん出力される。使用時間だけでなく、
180 (取得できる場合には) メモリや I/O、IPC 呼び出しなどの他のリソース
182 出力はフォーマット文字列を使って整形され、
183 フォーマット文字列は \-f オプションか環境変数
187 .\"O The default format string is
188 デフォルトのフォーマット文字列は以下の通り。
191 %Uuser %Ssystem %Eelapsed %PCPU (%Xtext+%Ddata %Mmax)k
193 %Iinputs+%Ooutputs (%Fmajor+%Rminor)pagefaults %Wswaps
197 .\"O When the \-p option is given the (portable) output format
198 \-p オプションが指定された場合には、(他と互換性のある) 出力
210 .\"O .SS "The format string"
212 .\"O The format is interpreted in the usual printf-like way.
213 .\"O Ordinary characters are directly copied, tab, newline
214 .\"O and backslash are escaped using \et, \en and \e\e,
215 .\"O a percent sign is represented by %%, and otherwise %
216 .\"O indicates a conversion.
219 .\"O will always add a trailing newline itself.
220 .\"O The conversions follow.
221 .\"O All of those used by
224 フォーマットはよくある printf 形式で解釈される。
226 タブ、改行 (newline)、バックスラッシュはそれぞれ \et, \en, \e\e で
228 パーセント記号は %% で表現され、それ以外の % は変換を示す。
229 末尾には必ず改行文字 (newline) が追加される。
232 で使用される変換は全てサポートされている。
237 .\"O Elapsed real time (in [hours:]minutes:seconds).
238 経過した実時間 ([hours:]minutes:seconds の形式)。
241 .\"O (Not in tcsh.) Elapsed real time (in seconds).
242 (tcsh にはない) 経過した実時間 (秒単位)。
245 .\"O Total number of CPU-seconds that the process spent in kernel mode.
246 そのプロセスがカーネルモードで消費した CPU 時間の合計 (秒単位)。
249 .\"O Total number of CPU-seconds that the process spent in user mode.
250 そのプロセスがユーザモードで消費した CPU 時間の合計 (秒単位)。
253 .\"O Percentage of the CPU that this job got, computed as (%U + %S) / %E.
254 このジョブが獲得した CPU の割り合い (パーセンテージ)。
255 (%U + %S) / %E で計算される。
260 .\"O Maximum resident set size of the process during its lifetime, in Kbytes.
261 プロセス生存中のそのプロセスの resident set size の最大値。
265 .\"O (Not in tcsh.) Average resident set size of the process, in Kbytes.
267 そのプロセスの resident set size の平均値。
271 .\"O Average total (data+stack+text) memory use of the process,
273 そのプロセスのメモリ使用量の合計 (データ+スタック+テキスト) の平均値。
277 .\"O Average size of the process's unshared data area, in Kbytes.
278 そのプロセスの非共有データ領域の平均サイズ。
282 .\"O (Not in tcsh.) Average size of the process's unshared stack space, in Kbytes.
284 そのプロセスの非共有スタック空間の平均サイズ。
288 .\"O Average size of the process's shared text space, in Kbytes.
289 そのプロセスの共有テキスト空間の平均サイズ。
293 .\"O (Not in tcsh.) System's page size, in bytes.
294 .\"O This is a per-system constant, but varies between systems.
295 (tcsh にはない) システムのページサイズ (バイト単位)。
296 この値はシステム毎に決まる定数だが、システムにより異なる。
299 .\"O Number of major page faults that occurred while the process was running.
300 .\"O These are faults where the page has to be read in from disk.
301 プロセスの動作中に発生したメジャーページフォルトの回数。
302 これは、ディスクからページを読み込む必要があったページフォルトに
306 .\"O Number of minor, or recoverable, page faults.
307 .\"O These are faults for pages that are not valid but which have
308 .\"O not yet been claimed by other virtual pages. Thus the data
309 .\"O in the page is still valid but the system tables must be updated.
310 マイナーページフォールト、つまり回復可能なページフォルトの回数。
311 これは、そのページは有効でないが、まだ他の仮想ページに奪われて
312 いなかったページに対するページフォルトに関するものである。
315 .\"O Number of times the process was swapped out of main memory.
316 そのプロセスが主記憶からスワップアウトされた回数。
319 .\"O Number of times the process was context-switched involuntarily
320 .\"O (because the time slice expired).
321 そのプロセスが (タイムスライスの経過により) 強制的にコンテキストスイッチ
325 .\"O Number of waits: times that the program was context-switched voluntarily,
326 .\"O for instance while waiting for an I/O operation to complete.
327 wait の回数、つまりそのプログラムが自発的にコンテキストスイッチされた回数。
328 例えば、I/O 操作の完了を待っている間などが該当する。
333 .\"O Number of file system inputs by the process.
334 そのプロセスによるファイルシステムからの入力の回数。
337 .\"O Number of file system outputs by the process.
338 そのプロセスによるファイルシステムへの出力の回数。
341 .\"O Number of socket messages received by the process.
342 そのプロセスが受信したソケットメッセージ数。
345 .\"O Number of socket messages sent by the process.
346 そのプロセスが送信したソケットメッセージ数。
349 .\"O Number of signals delivered to the process.
353 .\"O (Not in tcsh.) Name and command line arguments of the command being timed.
354 (tcsh にはない) time の対象となったコマンド名とコマンドライン引き数。
357 .\"O (Not in tcsh.) Exit status of the command.
358 (tcsh にはない) コマンドの終了ステータス。
359 .\"O .SS "GNU Options"
362 .BI "\-f " FORMAT ", \-\-format=" FORMAT
363 .\"O Specify output format, possibly overriding the format specified
364 .\"O in the environment variable TIME.
368 で指定されたフォーマットよりも優先される。
370 .B "\-p, \-\-portability"
371 .\"O Use the portable output format.
372 他の time と互換性のある出力フォーマットを使用する。
374 .BI "\-o " FILE ", \-\-output=" FILE
375 .\"O Do not send the results to \fIstderr\fp, but overwrite the specified file.
376 結果を \fIstderr\fP に送らず、指定されたファイルに書き込む。
380 .\"O (Used together with \-o.) Do not overwrite but append.
382 ファイルを上書きせずに、結果をファイル末尾に追加する。
384 .B "\-v, \-\-verbose"
385 .\"O Give very verbose output about all the program knows about.
386 非常に詳しい出力で、入手できる全ての情報を出力する。
387 .\"O .SS "GNU Standard Options"
391 .\"O Print a usage message on standard output and exit successfully.
392 使用方法に関するメッセージを標準出力に表示し、正常終了する。
394 .B "\-V, \-\-version"
395 .\"O Print version information on standard output, then exit successfully.
396 バージョン情報を標準出力に表示し、正常終了する。
399 .\"O Terminate option list.
403 .\"O Not all resources are measured by all versions of UNIX,
404 .\"O so some of the values might be reported as zero.
405 .\"O The present selection was mostly inspired by the data
406 .\"O provided by 4.2 or 4.3BSD.
407 全てのリソースが UNIX の全てのバージョンで計測されているわけではないので、
408 いくつかの値が 0 と報告される可能性がある。
409 現在の出力項目のほとんどは 4.2BSD や 4.3BSD で取得可能なデータに
412 .\"O GNU time version 1.7 is not yet localized.
413 .\"O Thus, it does not implement the POSIX requirements.
414 GNU time バージョン 1.7 はまだローカライズされていない。
415 そのため、POSIX の要件を実装していないことになる。
417 .\"O The environment variable
419 .\"O was badly chosen.
420 .\"O It is not unusual for systems like
421 .\"O .BR autoconf (1)
424 .\"O to use environment variables with the name of a utility to override
425 .\"O the utility to be used.
426 .\"O Uses like MORE or TIME for options to programs
427 .\"O (instead of program pathnames) tend to lead to difficulties.
433 のようなシステムでは、使用するコマンドを上書きするのにそのコマンドの
435 MORE や TIME のような名前を (プログラムのパス名の指定ではなく)
436 プログラムへのオプションを指定するのに使うと、
439 .\"O It seems unfortunate that \-o overwrites instead of appends.
440 .\"O (That is, the \-a option should be the default.)
441 \-o が追記ではなく上書きになっているのは残念なことだ
442 (つまり \-a オプションがデフォルトになっているべきだろうということだ)。
444 .\"O Mail suggestions and bug reports for GNU
448 .\"O .I bug\-utils@prep.ai.mit.edu
450 .\"O Please include the version of
452 .\"O which you can get by running
454 .\"O .I time \-\-version
456 .\"O and the operating system
457 .\"O and C compiler you used.
462 .I bug\-utils@prep.ai.mit.edu
470 のバージョンは以下のコマンドで取得できる。
476 .\" .IP "David Keppel"
478 .\" .IP "David MacKenzie"
479 .\" POSIXization, autoconfiscation, GNU getoptization,
480 .\" documentation, other bug fixes and improvements.
481 .\" .IP "Arne Henrik Juul"
482 .\" Helped with portability
483 .\" .IP "Francois Pinard"
484 .\" Helped with portability