From 34eb33407f1b1e5bca7aa0080df18513caa7e28e Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Thu, 28 Apr 2016 09:22:52 +0200 Subject: [PATCH] cgroups.7: Document /proc/cgroups Signed-off-by: Michael Kerrisk --- man7/cgroups.7 | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/man7/cgroups.7 b/man7/cgroups.7 index 26f89cffc..80eac9aa1 100644 --- a/man7/cgroups.7 +++ b/man7/cgroups.7 @@ -453,6 +453,48 @@ Further information can be found in the kernel source file .IR Documentation/cgroup-v1/pids.txt . .SS /proc files .TP +.IR /proc/cgroups " (since Linux 2.6.24)" +This file contains information about the cgroups version 1 controllers +that are available on the system. +An example of the contents of this file (reformatted for readability) +is the following: + +.nf +.in +4n +#subsys_name hierarchy num_cgroups enabled +cpuset 4 1 1 +cpu 8 1 1 +cpuacct 8 1 1 +blkio 6 1 1 +memory 3 1 1 +devices 10 84 1 +freezer 7 1 1 +net_cls 9 1 1 +perf_event 5 1 1 +net_prio 9 1 1 +hugetlb 0 1 0 +pids 2 1 1 +.in +.fi + +The fields in this file are, from left to right: +.RS +.IP 1. 3 +The name of the controller. +.IP 2. +A unique ID for the cgroup hierarchy on which this controller is mounted. +If the controller is not currently mounted, the value in this field is 0. +If multiple controllers are bound to the same hierarchy, +then each will show the same hierarchy ID in this field. +.IP 3. +The number of control groups in this hierarchy using this controller. +.IP 4. +This field contains the value 1 if this controller is enabled, +or 0 if it has been disabled (via the +.IR cgroup_disable +kernel command-line boot parameter). +.RE +.TP .IR /proc/[pid]/cgroup " (since Linux 2.6.24)" This file describes control groups to which the process belongs. The displayed information differs for