Linux Per-Process CPU Runtime Statistics: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 16: Line 16:
If we want to include time from children processes:
If we want to include time from children processes:


  total-time-proc-plus-children = total-time-proc + [[/proc/pid/stat#Field_16_-_cutime|cutime]] + [[/proc/pid/stat#Field_17_-_cstime|cstime]].
  total-time-proc-plus-children = total-time-proc + [[/proc/pid/stat#Field_16_-_cutime|cutime]] + [[/proc/pid/stat#Field_17_-_cstime|cstime]]

Revision as of 00:55, 2 March 2018

External

Internal

Overview

To determine total time spend by the process in user and kernel modes:

total-time-proc = utime + stime

If we want to include time from children processes:

total-time-proc-plus-children = total-time-proc + cutime + cstime