]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
man/cgxset: add man page for cgxset 220/head
authorTom Hromatka <tom.hromatka@oracle.com>
Wed, 3 Aug 2022 19:49:02 +0000 (13:49 -0600)
committerTom Hromatka <tom.hromatka@oracle.com>
Thu, 4 Aug 2022 19:01:10 +0000 (13:01 -0600)
Reviewed-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
doc/man/Makefile.am
doc/man/cgxset.1 [new file with mode: 0644]

index c5e9042a05c2f81847312203c64cb99b20ed3557..13cc0062adee60da5630eee24b6f260f199da527 100644 (file)
@@ -1,7 +1,7 @@
 man_MANS = cgclassify.1 cgconfig.conf.5 cgconfigparser.8 cgexec.1 \
           cgred.conf.5 cgrules.conf.5 cgrulesengd.8 cgcreate.1 cgset.1 \
           cgget.1 cgdelete.1 lssubsys.1 lscgroup.1 cgsnapshot.1 \
-          cgxget.1
+          cgxget.1 cgxset.1
 
 EXTRA_DIST = $(man_MANS)
 
diff --git a/doc/man/cgxset.1 b/doc/man/cgxset.1
new file mode 100644 (file)
index 0000000..818a50b
--- /dev/null
@@ -0,0 +1,76 @@
+.TH CGXSET  1 2022-08-03 "Linux" "libcgroup Manual"
+.SH NAME
+
+cgxset \- set the parameters of given cgroup(s)
+
+.SH SYNOPSIS
+\fBcgxset\fR [\fB-1\fR] [\fB-2\fR] [\fB-i\fR] [\fB-r\fR <\fIname=value\fR>] <\fBcgroup_path\fR> ...
+.br
+\fBcgxset\fR \fB--copy-from\fR <\fIsource_cgroup_path\fR> <\fBcgroup_path\fR> ...
+
+.SH DESCRIPTION
+Set the parameters of input cgroups.
+When the request's cgroup version differs from the system's cgroup version, \fBcgxset\fR will
+attempt to translate from one version to the other.
+If the request version and the system's version are the same, no translation is done and
+\fBcgxset\fR will behave like \fBcgset\fR.
+If no version is specified by the user (either [\fB-1\fR] or [\fB-2\fR]) and the [\fB-r\fR] flag
+is specified, the behavior is undefined.
+\fB--copy-from\fR does not require the cgroup version to be specified.
+
+.TP
+.B <path>
+is the name of the cgroup which should be changed.
+This parameter can be used multiple times.
+
+.TP
+.B -1, --v1
+data in/out of \fBcgxset\fR is in cgroup v1 format.
+In this mode, the user will provide values in cgroup v1 format and receive values in v1 format.
+format.
+If the system is running in cgroup v2 mode, libcgroup will convert the data as necessary
+
+.TP
+.B -2, --v2
+data in/out of \fBcgxset\fR is in cgroup v2 format.
+In this mode, the user will provide values in cgroup v2 format and receive values in v2 format.
+If the system is running in cgroup v1 mode, libcgroup will convert the data as necessary
+
+.TP
+.B -i, --ignore-unmappable
+ignore errors for values that cannot be converted from v1 to v2 or vice versa
+
+.TP
+.B -r <name=value>
+defines the name of the file to set and
+the value which should be written to that file.
+This parameter can be used multiple times.
+
+.TP
+.B --copy-from <source_cgroup_path>
+defines the name of the cgroup whose parameters will be
+copied to the input cgroup.
+
+.SH ENVIRONMENT VARIABLES
+.TP
+.B CGROUP_LOGLEVEL
+controls verbosity of the tool. Allowed values are \fBDEBUG\fR,
+\fBINFO\fR, \fBWARNING\fR or \fBERROR\fR.
+
+.SH EXAMPLES
+.TP
+.B cgxset -1 -r cpuset.cpus=0-1 student
+set variable cpus in control group student (controller cpuset) to 0-1
+
+.TP
+.B cgxset -2 -r cpu.weight=42 first
+set variable weight in control group first (controller cpu) to 42
+
+.TP
+.B cgxset --copy-from group1/ group2/
+copy all parameters of group group1 to group group2
+(for all path where both cgroups are defined)
+
+
+.SH SEE ALSO
+cgrules.conf (1), cgcreate (1), cgget (1), cgset (1), cgxget (1)