logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

cgxset - set the parameters of given cgroup(s)

Description

       Set  the parameters of input cgroups.  When the request's cgroup version differs from the system's cgroup
       version, cgxset 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 cgxset will behave like cgset.  If no version
       is specified by the user (either [-1] or [-2]) and the [-r] flag is specified, the behavior is undefined.
       --copy-from does not require the cgroup version to be specified.

       <path> is the name of the cgroup which should be changed.  This parameter can be used multiple times.

       -1,--v1
              data in/out of cgxset 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

       -2,--v2
              data in/out of cgxset 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

       -b     ignores the default systemd delegated hierarchy path and constructs the path of the control groups
              relative to the cgroup root hierarchy.

       -i,--ignore-unmappable
              ignore errors for values that cannot be converted from v1 to v2 or vice versa

       -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.

       --copy-from<source_cgroup_path>
              defines the name of the cgroup whose parameters will be copied to the input cgroup.

Environment Variables

CGROUP_LOGLEVEL
              controls verbosity of the tool. Allowed values are DEBUG, INFO, WARNING or ERROR.

Examples

cgxset-1-rcpuset.cpus=0-1student
              set variable cpus in control group student (controller cpuset) to 0-1

       cgxset-2-rcpu.weight=42first
              set variable weight in control group first (controller cpu) to 42

       cgxset--copy-fromgroup1/group2/
              copy all parameters of group group1 to group group2 (for all path where both cgroups are defined)

Name

       cgxset - set the parameters of given cgroup(s)

See Also

       cgrules.conf (1), cgcreate (1), cgget (1), cgset (1), cgxget (1)

Linux                                              2022-08-03                                          CGXSET(1)

Synopsis

cgxset [-1] [-2] [-i] [-b] [-r <name=value>] <cgroup_path> ...
       cgxset [-b] --copy-from <source_cgroup_path> <cgroup_path> ...

See Also