Linuxでps -efの出力を理解する

Linuxでps -efの出力を理解する

Linuxシステムでps -efを実行すると、次のようになります。 UID PID PPID C STIME TTY TIME CMD

C、TIMEの意味を説明してください。 TIMEはプロセスに割り当てられた実際のCPU時間ですか?

ベストアンサー1

実行man ps後にEnterを/SpaceShift+CSpaceEnter押すと、この行が表示されます。

   C     pcpu         cpu utilization

しかし、それはOBSOLETE SORT KEYSタイトルの下にあるので、私たちが探しているものではありません。

n次の一致を見つけるにはタップします。

   c           C         processor utilization. Currently, this is the
                         integer value of the percent usage over the
                         lifetime of the process.
                         (see %cpu).

いいと思います。詳細は以下を検索して%cpu見つけました。

   %cpu        %CPU      cpu utilization of the process in "##.#" format.
                         Currently, it is the CPU time used divided by the
                         time the process has been running cputime/realtime
                         ratio), expressed as a percentage. ...
                         (alias pcpu).

2つの一致がありますが、TIME一致する形式は1つだけですhh:mm:ss

   cputime     TIME      cumulative CPU time, "[DD-]hh:mm:ss" format. (alias time).

累積CPU時間は、プロセッサがプロセスを実行するのに費やす時間、つまり省電力、実行待機、またはI / O待機に費やされる時間ではなく、CPUサイクルの実際の使用時間です。

で説明されている合計値を合計することによって決定utimeされます。stimeproc(5) マニュアルページ

  utime %lu   Amount of time that this process has been scheduled in user mode...
  stime %lu   Amount of time that this process has been scheduled in kernel mode...

おすすめ記事