{
    "mode": "man",
    "parameter": "CGSNAPSHOT",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/man/CGSNAPSHOT/json",
    "generated": "2026-11-10T02:35:05Z",
    "synopsis": "cgsnapshot [-h] [-s] [-t] [-b file] [-w file] [-f outputfile] [controller] [...]",
    "sections": {
        "NAME": {
            "content": "cgsnapshot - generate the configuration file for given controllers\n\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "cgsnapshot [-h] [-s] [-t] [-b file] [-w file] [-f outputfile] [controller] [...]\n\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "cgsnapshot  generates  the  cgconfig compatible configuration file for the given controllers.\nIf no controller is set, then cgsnapshot shows all mounted hierarchies.  The output is in the\nsame format as the cgconfig.conf configuration file.\n\n",
            "subsections": [
                {
                    "name": "-b file",
                    "content": "Display only variables from the blacklist.  The default location of the  blacklist  is\n/etc/cgsnapshotblacklist.conf.   This list contains all variables which should be ig‐\nnored by the cgsnapshot If the variable is blacklisted, it will not be displayed.   If\nit is not present on the blacklist, the whitelist is checked.\n\n",
                    "flag": "-b"
                },
                {
                    "name": "-h, --help",
                    "content": "display this help and exit\n\n",
                    "flag": "-h",
                    "long": "--help"
                },
                {
                    "name": "-f, --file",
                    "content": "Redirect the output to outputfile\n\n\n",
                    "flag": "-f",
                    "long": "--file"
                },
                {
                    "name": "-s, --silent",
                    "content": "Ignore all warnings\n\n",
                    "flag": "-s",
                    "long": "--silent"
                },
                {
                    "name": "-t, --strict",
                    "content": "Do not display the variables which are not on the whitelist\n\n\n",
                    "flag": "-t",
                    "long": "--strict"
                },
                {
                    "name": "-w file",
                    "content": "Set  the  blacklist configuration file.  This list contains all variables which should\nbe displayed by cgsnapshot If the  variable  is  not  blacklisted,  the  whitelist  is\nchecked.   If  the  variable is on the whitelist, it is displayed by cgsnapshot If the\nvariable is not on the whitelist, the variable is displayed and a warning  message  is\nproduced.  By default the whitelist is not used.\n\nThe  warning  message can be omitted using the -s, --silent flag.  If the -t, --strict\nflag is used, the variable which is not on the whitelist is not displayed.\n\n",
                    "flag": "-w"
                },
                {
                    "name": "controller",
                    "content": "defines the controller whose hierarchies will be output\n\n"
                }
            ]
        },
        "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/cgsnapshot_blacklist.conf",
                    "content": "default blacklist\n\n"
                },
                {
                    "name": "/etc/cgsnapshot_whitelist.conf",
                    "content": "default whitelist\n\n"
                },
                {
                    "name": "/etc/cgconfig.conf",
                    "content": "default libcgroup configuration file\n\n"
                }
            ]
        },
        "EXAMPLES": {
            "content": "",
            "subsections": [
                {
                    "name": "cgsnapshot -s -f /etc/cgconfig.conf.cgsnapshot",
                    "content": "create configuration file which contains  all  mounted  controllers  and  all  control\ngroups which are on the actual system\n\n"
                },
                {
                    "name": "cgsnapshot -s -f /etc/cgconfig.conf.cgsnapshot cpu",
                    "content": "create  configuration  file which contains hierarchy containing cpu controller and all\nits control groups on the actual system\n\n\n\n"
                }
            ]
        },
        "SEE ALSO": {
            "content": "cgconfig.conf (5)\n\nLinux                                        2010-07-28                                CGSNAPSHOT(1)",
            "subsections": []
        }
    },
    "summary": "cgsnapshot - generate the configuration file for given controllers",
    "flags": [
        {
            "flag": "-b",
            "long": null,
            "arg": null,
            "description": "Display only variables from the blacklist. The default location of the blacklist is /etc/cgsnapshotblacklist.conf. This list contains all variables which should be ig‐ nored by the cgsnapshot If the variable is blacklisted, it will not be displayed. If it is not present on the blacklist, the whitelist is checked."
        },
        {
            "flag": "-h",
            "long": "--help",
            "arg": null,
            "description": "display this help and exit"
        },
        {
            "flag": "-f",
            "long": "--file",
            "arg": null,
            "description": "Redirect the output to outputfile"
        },
        {
            "flag": "-s",
            "long": "--silent",
            "arg": null,
            "description": "Ignore all warnings"
        },
        {
            "flag": "-t",
            "long": "--strict",
            "arg": null,
            "description": "Do not display the variables which are not on the whitelist"
        },
        {
            "flag": "-w",
            "long": null,
            "arg": null,
            "description": "Set the blacklist configuration file. This list contains all variables which should be displayed by cgsnapshot If the variable is not blacklisted, the whitelist is checked. If the variable is on the whitelist, it is displayed by cgsnapshot If the variable is not on the whitelist, the variable is displayed and a warning message is produced. By default the whitelist is not used. The warning message can be omitted using the -s, --silent flag. If the -t, --strict flag is used, the variable which is not on the whitelist is not displayed."
        }
    ],
    "examples": [
        "create configuration file which contains  all  mounted  controllers  and  all  control",
        "groups which are on the actual system",
        "create  configuration  file which contains hierarchy containing cpu controller and all",
        "its control groups on the actual system"
    ],
    "see_also": []
}