diff options
author | Colin Cross <ccross@android.com> | 2011-06-29 13:54:42 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2011-06-29 13:54:42 -0700 |
commit | e55d4fa96762fd767a3b6d842c904e994db6bb2e (patch) | |
tree | c74157e01cb128cb97f106a50cfadc4c8b872c41 /Documentation/cgroups/cpuacct.txt | |
parent | e32c14667e4fe9f16ac9b918d15d29abd2315a55 (diff) | |
parent | b0af8dfdd67699e25083478c63eedef2e72ebd85 (diff) |
Merge commit 'v3.0-rc5' into android-3.0
Diffstat (limited to 'Documentation/cgroups/cpuacct.txt')
-rw-r--r-- | Documentation/cgroups/cpuacct.txt | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/Documentation/cgroups/cpuacct.txt b/Documentation/cgroups/cpuacct.txt index 84e471b612e..34197079f18 100644 --- a/Documentation/cgroups/cpuacct.txt +++ b/Documentation/cgroups/cpuacct.txt @@ -10,26 +10,25 @@ directly present in its group. Accounting groups can be created by first mounting the cgroup filesystem. -# mkdir /cgroups -# mount -t cgroup -ocpuacct none /cgroups - -With the above step, the initial or the parent accounting group -becomes visible at /cgroups. At bootup, this group includes all the -tasks in the system. /cgroups/tasks lists the tasks in this cgroup. -/cgroups/cpuacct.usage gives the CPU time (in nanoseconds) obtained by -this group which is essentially the CPU time obtained by all the tasks +# mount -t cgroup -ocpuacct none /sys/fs/cgroup + +With the above step, the initial or the parent accounting group becomes +visible at /sys/fs/cgroup. At bootup, this group includes all the tasks in +the system. /sys/fs/cgroup/tasks lists the tasks in this cgroup. +/sys/fs/cgroup/cpuacct.usage gives the CPU time (in nanoseconds) obtained +by this group which is essentially the CPU time obtained by all the tasks in the system. -New accounting groups can be created under the parent group /cgroups. +New accounting groups can be created under the parent group /sys/fs/cgroup. -# cd /cgroups +# cd /sys/fs/cgroup # mkdir g1 # echo $$ > g1 The above steps create a new group g1 and move the current shell process (bash) into it. CPU time consumed by this bash and its children can be obtained from g1/cpuacct.usage and the same is accumulated in -/cgroups/cpuacct.usage also. +/sys/fs/cgroup/cpuacct.usage also. cpuacct.stat file lists a few statistics which further divide the CPU time obtained by the cgroup into user and system times. Currently |