Show Table of Contents
A.3. cpuacct
CPU 统计(CPU accounting)(
cpuacct
)子系统会自动生成报告来显示 cgroup 任务所使用的 CPU 资源,其中包括子群组任务。报告有三种:
- cpuacct.usage
- 报告此 cgroup 中所有任务(包括层级中的低端任务)使用 CPU 的总时间(纳秒)。
注意
如要重新设定cpuacct.usage
的值,请执行以下指令:~]#
echo 0 > /cgroup/cpuacct/cpuacct.usage
上述指令也将重置cpuacct.usage_percpu
中的值。 - cpuacct.stat
- 报告此 cgroup 的所有任务(包括层级中的低端任务)使用的用户和系统 CPU 时间,方式如下:
user
— 用户模式中任务使用的 CPU 时间。system
— 系统(kernel)模式中任务使用的 CPU 时间。
CPU 时间将报告于USER_HZ
变量定义的单位中。 - cpuacct.usage_percpu
- 报告 cgroup 中所有任务(包括层级中的低端任务)在每个 CPU 中使用的 CPU 时间(纳秒)。
Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.