]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
man: document cgcreate's -c and -S options
authorTom Hromatka <tom.hromatka@oracle.com>
Thu, 6 Apr 2023 19:36:57 +0000 (13:36 -0600)
committerTom Hromatka <tom.hromatka@oracle.com>
Thu, 20 Apr 2023 20:17:30 +0000 (14:17 -0600)
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 <tom.hromatka@oracle.com>
Reviewed-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
(cherry picked from commit 962d5e5ddc9ac735a62a557d58b3f50dcd400477)

doc/man/cgcreate.1

index eed14ad874c3062d2f2b32245a819d6d310a4cb5..53faee4551daf4e31313f7d51d75a19b5800f230 100644 (file)
@@ -5,8 +5,9 @@
 cgcreate \- create new cgroup(s)
 
 .SH SYNOPSIS
-\fBcgcreate\fR [\fB-h\fR] [\fB-b\fR] [\fB-t\fR <\fItuid>:<tgid\fR>]
-[\fB-a\fR <\fIagid>:<auid\fR>] [\fB-f\fR mode] [\fB-d\fR mode]
+\fBcgcreate\fR [\fB-h\fR] [\fB-b\fR] [\fB-c\fR]
+[\fB-t\fR <\fItuid>:<tgid\fR>] [\fB-a\fR <\fIagid>:<auid\fR>]
+[\fB-f\fR mode] [\fB-d\fR mode]
 [\fB-s\fR mode] \fB-g\fR <\fIcontrollers>:<path\fR> [\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-name>.slice/<scope-name>.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 <tuid>:<tgid>
 defines the name of the user and the group, which owns tasks