3.3. cpuacct

The CPU Accounting (cpuacct) subsystem generates automatic reports on CPU resources used by the tasks in a cgroup, including tasks in child groups. Three reports are available:
cpuacct.usage
reports the total CPU time (in nanoseconds) consumed by all tasks in this cgroup (including tasks lower in the hierarchy).

Note

To reset the value in cpuacct.usage, execute the following command:
~]# echo 0 > /cgroup/cpuacct/cpuacct.usage
The above command also resets values in cpuacct.usage_percpu.
cpuacct.stat
reports the user and system CPU time consumed by all tasks in this cgroup (including tasks lower in the hierarchy) in the following way:
  • user — CPU time consumed by tasks in user mode.
  • system — CPU time consumed by tasks in system (kernel) mode.
CPU time is reported in the units defined by the USER_HZ variable.
cpuacct.usage_percpu
reports the CPU time (in nanoseconds) consumed on each CPU by all tasks in this cgroup (including tasks lower in the hierarchy).