{
    "content": [
        {
            "type": "text",
            "text": "# CGCLASSIFY (man)\n\n## NAME\n\ncgclassify - move running task(s) to given cgroups\n\n## SYNOPSIS\n\ncgclassify [-g <controllers>:<path>] [--sticky | --cancel-sticky] <pidlist>\n\n## DESCRIPTION\n\nthis  command moves processes defined by the list of processes (pidlist) to the given control\ngroups.\n\n## TLDR\n\n> Move running tasks to `cgroups`.\n\n- Move the process with a specific PID to the control [g]roup student in the CPU hierarchy:\n  `cgclassify -g {{cpu:student}} {{1234}}`\n- Move the process with a specific PID to control groups based on the `/etc/cgrules.conf` configuration file:\n  `cgclassify {{1234}}`\n- Move the process with a specific PID to the control [g]roup 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`):\n  `cgclassify --sticky -g {{cpu:/student}} {{1234}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION** (3 subsections)\n- **ENVIRONMENT VARIABLES**\n- **FILES** (2 subsections)\n- **EXAMPLES** (3 subsections)\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "CGCLASSIFY",
        "section": "",
        "mode": "man",
        "summary": "cgclassify - move running task(s) to given cgroups",
        "synopsis": "cgclassify [-g <controllers>:<path>] [--sticky | --cancel-sticky] <pidlist>",
        "tldr_summary": "Move running tasks to `cgroups`.",
        "tldr_examples": [
            {
                "description": "Move the process with a specific PID to the control [g]roup student in the CPU hierarchy",
                "command": "cgclassify -g {{cpu:student}} {{1234}}"
            },
            {
                "description": "Move the process with a specific PID to control groups based on the `/etc/cgrules.conf` configuration file",
                "command": "cgclassify {{1234}}"
            },
            {
                "description": "Move the process with a specific PID to the control [g]roup 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`)",
                "command": "cgclassify --sticky -g {{cpu:/student}} {{1234}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-g",
                "long": null,
                "arg": null,
                "description": "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."
            },
            {
                "flag": "",
                "long": "--sticky",
                "arg": null,
                "description": "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."
            },
            {
                "flag": "",
                "long": "--cancel-sticky",
                "arg": null,
                "description": "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."
            }
        ],
        "examples": [
            "moves process with pid number 1234 to control group student in cpu hierarchy.",
            "moves process with pid number 1234 to control groups based on  /etc/cgrules.conf  con‐",
            "figuration file.",
            "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": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 6,
                "subsections": [
                    {
                        "name": "-g <controllers>:<path>",
                        "lines": 12,
                        "flag": "-g"
                    },
                    {
                        "name": "--sticky",
                        "lines": 6,
                        "long": "--sticky"
                    },
                    {
                        "name": "--cancel-sticky",
                        "lines": 5,
                        "long": "--cancel-sticky"
                    }
                ]
            },
            {
                "name": "ENVIRONMENT VARIABLES",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "FILES",
                "lines": 1,
                "subsections": [
                    {
                        "name": "/etc/cgrules.conf",
                        "lines": 2
                    },
                    {
                        "name": "/etc/cgrules.d",
                        "lines": 3
                    }
                ]
            },
            {
                "name": "EXAMPLES",
                "lines": 1,
                "subsections": [
                    {
                        "name": "cgclassify -g cpu:student 1234",
                        "lines": 3
                    },
                    {
                        "name": "cgclassify 1234",
                        "lines": 4
                    },
                    {
                        "name": "cgclassify --sticky -g cpu:/student 1234",
                        "lines": 5
                    }
                ]
            },
            {
                "name": "SEE ALSO",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "cgclassify - move running task(s) to given cgroups\n\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "cgclassify [-g <controllers>:<path>] [--sticky | --cancel-sticky] <pidlist>\n\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "this  command moves processes defined by the list of processes (pidlist) to the given control\ngroups.\n\nThe pids in the pidlist are separated by spaces\n\n",
                "subsections": [
                    {
                        "name": "-g <controllers>:<path>",
                        "content": "defines the control groups where the task will be moved.  controllers  is  a  list  of\ncontrollers  and  path is the relative path to control groups in the given controllers\nlist.\n\nThis flag can be used multiple times to define multiple pairs of lists of  controllers\nand  relative  paths.   Instead of the list of all mounted controllers, the wildcard *\ncan be used.\n\nIf this option is not used then cgclassify will automatically move the task to a  con‐\ntrol group based on /etc/cgrules.conf.\n\n",
                        "flag": "-g"
                    },
                    {
                        "name": "--sticky",
                        "content": "If  this  option  is  used, the daemon of service cgred (cgrulesengd process) does not\nchange both the specified pidlist and their children tasks.  Without this option,  the\ndaemon  does not change the specified pidlist but it automatically changes their child\ntasks to the right cgroup based on /etc/cgrules.conf.\n\n",
                        "long": "--sticky"
                    },
                    {
                        "name": "--cancel-sticky",
                        "content": "If this option is used, the daemon of service cgred (cgrulesengd process) can automat‐\nically  change  both  the  specified pidlist and their child tasks to the right cgroup\nbased on /etc/cgrules.conf.\n\n",
                        "long": "--cancel-sticky"
                    }
                ]
            },
            "ENVIRONMENT VARIABLES": {
                "content": "CGROUPLOGLEVEL\ncontrols verbosity of the tool. Allowed values are DEBUG, INFO, WARNING or ERROR.\n\n",
                "subsections": []
            },
            "FILES": {
                "content": "",
                "subsections": [
                    {
                        "name": "/etc/cgrules.conf",
                        "content": "default libcgroup configuration file\n"
                    },
                    {
                        "name": "/etc/cgrules.d",
                        "content": "default libcgroup configuration files directory\n\n"
                    }
                ]
            },
            "EXAMPLES": {
                "content": "",
                "subsections": [
                    {
                        "name": "cgclassify -g cpu:student 1234",
                        "content": "moves process with pid number 1234 to control group student in cpu hierarchy.\n\n"
                    },
                    {
                        "name": "cgclassify 1234",
                        "content": "moves process with pid number 1234 to control groups based on  /etc/cgrules.conf  con‐\nfiguration file.\n\n"
                    },
                    {
                        "name": "cgclassify --sticky -g cpu:/student 1234",
                        "content": "moves  process  with  pid  number 1234 to control group student in cpu hierarchy.  The\ndaemon of service cgred does not change cgroups of pid 1234 and its children (based on\n/etc/cgrules.conf).\n\n"
                    }
                ]
            },
            "SEE ALSO": {
                "content": "cgrules.conf (5), cgexec (1)\n\n\n\n\nLinux                                        2009-03-15                                CGCLASSIFY(1)",
                "subsections": []
            }
        }
    }
}