phpMan > man > CGCLASSIFY(1)

Markdown | JSON | MCP    

TLDR: CGCLASSIFY (tldr-pages)

Move running tasks to `cgroups`.

  • Move the process with a specific PID to the control group student in the CPU hierarchy
    cgclassify -g {{cpu:student}} {{1234}}
  • Move the process with a specific PID to control groups based on the `/etc/cgrules.conf` configuration file
    cgclassify {{1234}}
  • Move the process with a specific PID to the control group student in the CPU hierarchy. Note: The daemon of the service `cgred` does not change `cgroups` of the specific PID and its children (based on `/etc/cgrules.conf`)
    cgclassify --sticky -g {{cpu:/student}} {{1234}}
CGCLASSIFY(1)                             libcgroup Manual                             CGCLASSIFY(1)



NAME
       cgclassify - move running task(s) to given cgroups


SYNOPSIS
       cgclassify [-g <controllers>:<path>] [--sticky | --cancel-sticky] <pidlist>


DESCRIPTION
       this  command moves processes defined by the list of processes (pidlist) to the given control
       groups.

       The pids in the pidlist are separated by spaces


       -g <controllers>:<path>
              defines the control groups where the task will be moved.  controllers  is  a  list  of
              controllers  and  path is the relative path to control groups in the given controllers
              list.

              This flag can be used multiple times to define multiple pairs of lists of  controllers
              and  relative  paths.   Instead of the list of all mounted controllers, the wildcard *
              can be used.

              If this option is not used then cgclassify will automatically move the task to a  con‐
              trol group based on /etc/cgrules.conf.


       --sticky
              If  this  option  is  used, the daemon of service cgred (cgrulesengd process) does not
              change both the specified pidlist and their children tasks.  Without this option,  the
              daemon  does not change the specified pidlist but it automatically changes their child
              tasks to the right cgroup based on /etc/cgrules.conf.


       --cancel-sticky
              If this option is used, the daemon of service cgred (cgrulesengd process) can automat‐
              ically  change  both  the  specified pidlist and their child tasks to the right cgroup
              based on /etc/cgrules.conf.


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


FILES
       /etc/cgrules.conf
              default libcgroup configuration file

       /etc/cgrules.d
              default libcgroup configuration files directory


EXAMPLES
       cgclassify -g cpu:student 1234
              moves process with pid number 1234 to control group student in cpu hierarchy.


       cgclassify 1234
              moves process with pid number 1234 to control groups based on  /etc/cgrules.conf  con‐
              figuration file.


       cgclassify --sticky -g cpu:/student 1234
              moves  process  with  pid  number 1234 to control group student in cpu hierarchy.  The
              daemon of service cgred does not change cgroups of pid 1234 and its children (based on
              /etc/cgrules.conf).


SEE ALSO
       cgrules.conf (5), cgexec (1)




Linux                                        2009-03-15                                CGCLASSIFY(1)
CGCLASSIFY(1)
NAME SYNOPSIS DESCRIPTION
-g : --sticky --cancel-sticky
ENVIRONMENT VARIABLES FILES
/etc/cgrules.conf /etc/cgrules.d
EXAMPLES
cgclassify -g cpu:student 1234 cgclassify 1234 cgclassify --sticky -g cpu:/student 1234
SEE ALSO

Generated by phpMan v3.7.7 Author: Che Dong Under GNU General Public License
2026-06-10 05:39 @216.73.217.62
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 TransitionalValid CSS!

^_back to top