From 5e071499bb957be45f1b0f174f5b8c10b4855c3e Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Wed, 27 Dec 2017 19:20:55 +0100 Subject: [PATCH] cgroups.7: Document cgroups v2 cgroup.stat file Based on the text in Documentation/cgroup-v2.txt. Reviewed-by: Roman Gushchin Signed-off-by: Michael Kerrisk --- man7/cgroups.7 | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/man7/cgroups.7 b/man7/cgroups.7 index 2705df4c0..2f945c3de 100644 --- a/man7/cgroups.7 +++ b/man7/cgroups.7 @@ -774,6 +774,29 @@ of a process for each notification. Second, notification can be delegated to a process that lives inside a container associated with the newly empty cgroup. .\" +.SS Cgroups v2 cgroup.stat file +.\" commit ec39225cca42c05ac36853d11d28f877fde5c42e +Each cgroup in the v2 hierarchy contains a read-only +.IR cgroup.stat +file (first introduced in Linux 4.14) +that consists of lines containing key-value pairs. +The following keys currently appear in this file: +.TP +.I nr_descendants +This is the total number of visible (i.e., living) descendant cgroups +underneath this cgroup. +.TP +.I nr_dying_descendants +This is the total number of dying descendant cgroups +underneath this cgroup. +A cgroup enters the dying state after being deleted. +It remains in that state for an undefined period +(which will depend on system load) +before being destroyed. +.IP +A process can't be made a member of a dying cgroup, +and a dying cgroup can't be brought back to life. +.\" .SS Cgroups v2 delegation In the context of cgroups, delegation means passing management of some subtree