From 0a7fd68ce76cd91e3751d4f193367a5eb13c0ae0 Mon Sep 17 00:00:00 2001 From: Tom Hromatka Date: Thu, 6 Apr 2023 13:36:57 -0600 Subject: [PATCH] man: document cgcreate's -c and -S options Add documentation about the -c (create scope) option and the -S (set as default) option in the cgcreate man page. -c instructs cgcreate to invoke cgroup_create_scope2() and create a systemd scope. -S (used in conjunction with -c) will set the provided scope as the default for subsequent libcgroup operations. Signed-off-by: Tom Hromatka Reviewed-by: Kamalesh Babulal (cherry picked from commit 962d5e5ddc9ac735a62a557d58b3f50dcd400477) --- doc/man/cgcreate.1 | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/doc/man/cgcreate.1 b/doc/man/cgcreate.1 index eed14ad8..53faee45 100644 --- a/doc/man/cgcreate.1 +++ b/doc/man/cgcreate.1 @@ -5,8 +5,9 @@ cgcreate \- create new cgroup(s) .SH SYNOPSIS -\fBcgcreate\fR [\fB-h\fR] [\fB-b\fR] [\fB-t\fR <\fItuid>:] -[\fB-a\fR <\fIagid>:] [\fB-f\fR mode] [\fB-d\fR mode] +\fBcgcreate\fR [\fB-h\fR] [\fB-b\fR] [\fB-c\fR] +[\fB-t\fR <\fItuid>:] [\fB-a\fR <\fIagid>:] +[\fB-f\fR mode] [\fB-d\fR mode] [\fB-s\fR mode] \fB-g\fR <\fIcontrollers>: [\fB-g\fR ...] .SH DESCRIPTION @@ -26,6 +27,14 @@ ignores the default systemd delegated hierarchy path and constructs the path of the control groups relative to the cgroup root hierarchy. +.TP +.B -c, --scope +creates a new systemd scope. The cgroup name provided after the +\fB-g\fR flag must be of the form +\fB.slice/.scope\fR. If the slice +does not exist, systemd will create it. Libcgroup will place an +idle process in the scope's cgroup.procs file. + .TP .B -d, --dperm=mode sets the permissions of a control groups directory. @@ -63,6 +72,12 @@ The value is not used as given because the current owner's permissions are used as an umask (so 777 will set group and others permissions to the owners permissions). +.TP +.B -S, --setdefault +sets the scope specified via the \fB-c\fR option as the default +libcgroup scope. This default scope is used by libcgroup tools +to build up the cgroup path. See the \fB-b\fR option. + .TP .B -t : defines the name of the user and the group, which owns tasks -- 2.47.2