Chinese translated version of Documentation/sound/alsa/powersave.txt
If you have any comment or update to the content, please contact the
original document maintainer directly. However, if you have a problem
communicating in English you can also ask the Chinese maintainer for
help. Contact the Chinese maintainer if this translation is outdated
or if there is a problem with the translation.
Chinese maintainer: 沈芳丽 <fairyshen@163.com>
--------------------------------------------------------------
Documentation/accounting/cgroupstats.txt的中文翻译
如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文
交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻
译存在问题,请联系中文版维护者。
中文版维护者:沈芳丽 <fairyshen@163.com>
中文版翻译者:沈芳丽 <fairyshen@163.com>
中文版校译者: 沈芳丽 <fairyshen@163.com>
以下为正文
---------------------------------------------------------------------
Control Groupstats is inspired by the discussion at http://lkml.org/lkml/2007/4/11/187
and implements per cgroup statistics as suggested by Andrew Morton in http://lkml.org/lkml/2007/4/11/263.
控制Groupstats的灵感来自http://lkml.org/lkml/2007/4/11/187的讨论和实现每个cgroup的
统计来自于安德鲁·莫顿在http://lkml.org/lkml/2007/4/263上的建议。
Per cgroup statistics infrastructure re-uses code from the taskstats interface. A new set
of cgroup operations are registered with commands and attributes specific to cgroups.
It should be very easy to extend per cgroup statistics, by adding members to the
cgroupstats structure.
每个cgroup的基础设施统计从taskstats接口重新使用代码。一组新的cgroup业务带着命令和
cgroup的特定属性登记。通过添加成员的cgroupstats结构,延长每cgroup的统计应该是很容易的。
The current model for cgroupstats is a pull, a push model (to post statistics on interesting events),
should be very easy to add.
当前cgroupstats是一个拉动模型,推动模型(在有趣的活动上发布统计数字)应该很容易添加。
Currently user space requests for statistics by passing the cgroup path.
目前用户空间通过cgroup路径请求统计。
Statistics about the state of all the tasks in the cgroup is returned to user space.
该cgroup中所有任务的状态统计信息被返回给用户空间。
NOTE: We currently rely on delay accounting for extracting information about tasks blocked on I/O.
注意:我们目前依靠延迟会计提取信息阻塞I / O的任务。
If CONFIG_TASK_DELAY_ACCT is disabled, this information will not be available.
如果CONFIG_TASK_DELAY_ACCT被禁用,这些信息将不可用。
To extract cgroup statistics a utility very similar to getdelays.c has been developed, the sample
output of the utility is shown below。
一个非常相似getdelays.c的实用程序已开发来提取cgroup的统计数据,该实用程序的输出示例如下所示。
~/balbir/cgroupstats # ./getdelays -C "/sys/fs/cgroup/a"
sleeping 1, blocked 0, running 1, stopped 0, uninterruptible 0
~/balbir/cgroupstats # ./getdelays -C "/sys/fs/cgroup"
sleeping 155, blocked 0, running 1, stopped 0, uninterruptible 2