2016-10-13 13 views
0

/usr/bin/time -vのさまざまな出力が何を意味しているかについての詳細な情報を見つけるのは苦労しています。つまり、私はファイルの入出力の意味について混乱しています。/usr/bin/timeファイル入出力

誰かが「/ usr/bin/time」の経験がある人は、私のためにこれを整えることができたら大変感謝しています。

答えて

0

あなたのOSは何ですか?BSDのLinuxですか?

ありtimeユーティリティ(セクション1)のmanページ内のフィールドのいくつかの記述は、Linuxで、たとえば、次のとおりです。http://man7.org/linux/man-pages/man1/time.1.html

しかし、時間自体は、おそらく、情報を取得するためにカーネルにwait3/wait4http://man7.org/linux/man-pages/man2/wait3.2.html をいくつかのインターフェースを使用していますtime -vに印刷されたデータは、getrusage(2) manページに記述されてstruct rusageからです:Linuxのhttp://man7.org/linux/man-pages/man2/getrusage.2.html

のLinuxのrusageで多くのフィールドを持っていますが、すべてのフィールドが使用されていない。

The resource usages are returned in the structure pointed to by 
    usage, which has the following form: 

     struct rusage { 
      struct timeval ru_utime; /* user CPU time used */ 
      struct timeval ru_stime; /* system CPU time used */ 
      long ru_maxrss;  /* maximum resident set size */ 
      long ru_ixrss;   /* integral shared memory size */ 
      long ru_idrss;   /* integral unshared data size */ 
      long ru_isrss;   /* integral unshared stack size */ 
      long ru_minflt;  /* page reclaims (soft page faults) */ 
      long ru_majflt;  /* page faults (hard page faults) */ 
      long ru_nswap;   /* swaps */ 
      long ru_inblock;  /* block input operations */ 
      long ru_oublock;  /* block output operations */ 
      long ru_msgsnd;  /* IPC messages sent */ 
      long ru_msgrcv;  /* IPC messages received */ 
      long ru_nsignals;  /* signals received */ 
      long ru_nvcsw;   /* voluntary context switches */ 
      long ru_nivcsw;  /* involuntary context switches */ 
     }; 

http://man7.org/linux/man-pages/man2/getrusage.2.htmlもいくつかの説明を与えるとマークメンテナンスされていないフィールド:それは実装固有http://pubs.opengroup.org/onlinepubs/009695399/functions/getrusage.html

ヘッダが定義するものであるので、

ru_utime 
    ru_stime 
    ru_maxrss (since Linux 2.6.32) 
    ru_ixrss (unmaintained) 
    ru_idrss (unmaintained) 
    ru_isrss (unmaintained) 
    ru_minflt 
    ru_majflt 
    ru_nswap (unmaintained) 
    ru_inblock (since Linux 2.6.22) 
      The number of times the filesystem had to perform input. 
    ru_oublock (since Linux 2.6.22) 
      The number of times the filesystem had to perform output. 
    ru_msgsnd (unmaintained) 
    ru_msgrcv (unmaintained) 
    ru_nsignals (unmaintained) 
    ru_nvcsw (since Linux 2.6) 
    ru_nivcsw (since Linux 2.6) 

POSIX 2004は、実装するために何の正確なリストを持っていません少なくとも以下のメンバーを含むラッセル構造:

struct timeval ru_utime User time used. 
struct timeval ru_stime System time used. 
関連する問題