CGSNAPSHOT(1) libcgroup Manual CGSNAPSHOT(1)

# [NAME](#NAME)

cgsnapshot - generate the configuration file for given controllers

# [SYNOPSIS](#SYNOPSIS)

**cgsnapshot** \[**-h**] \[**-s**] \[**-t**] \[**-b** *file*] \[**-w** *file*] \[**-f** *output\_file*] \[**controller**] \[...]

# [DESCRIPTION](#DESCRIPTION)

**cgsnapshot** generates the cgconfig compatible configuration file for the given controllers. If no controller is set, then cgsnapshot shows all mounted hierarchies. The output is in the same format as the **cgconfig.conf** configuration file.

[**-b file**](#b)

Display only variables from the denylist. The default location of the denylist is **/etc/cgsnapshot\_denylist.conf.** This list contains all variables which should be ignored by the **cgsnapshot** If the variable is denylisted, it will not be displayed. If it is not present on the denylist, the allowlist is checked.

[**-h, --help**](#h,)

display this help and exit

[**-f, --file**](#f,)

Redirect the output to output\_file

[**-s, --silent**](#s,)

Ignore all warnings

[**-t, --strict**](#t,)

Do not display the variables which are not on the allowlist

[**-w file**](#w)

Set the denylist configuration file. This list contains all variables which should be displayed by **cgsnapshot** If the variable is not denylisted, the allowlist is checked. If the variable is on the allowlist, it is displayed by **cgsnapshot** If the variable is not on the allowlist, the variable is displayed and a warning message is produced. By default the allowlist 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 allowlist is not displayed.

[**controller**](#controller)

defines the controller whose hierarchies will be output

# [ENVIRONMENT VARIABLES](#ENVIRONMENT_VARIABLES)

[**CGROUP\_LOGLEVEL**](#CGROUP_LOGLEVEL)

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

# [FILES](#FILES)

**/etc/cgsnapshot\_denylist.conf**

default denylist

**/etc/cgsnapshot\_allowlist.conf**

default allowlist

**/etc/cgconfig.conf**

default libcgroup configuration file

# [EXAMPLES](#EXAMPLES)

[**cgsnapshot -s -f /etc/cgconfig.conf.cgsnapshot**](#cgsnapshot)

create configuration file which contains all mounted controllers and all control groups which are on the actual system

[**cgsnapshot -s -f /etc/cgconfig.conf.cgsnapshot cpu**](#cgsnapshot~2)

create configuration file which contains hierarchy containing cpu controller and all its control groups on the actual system

# [SEE ALSO](#SEE_ALSO)

[cgconfig.conf (5)](/man/enterprise-packages/libcgroup/cgconfig.conf.5)

2010-07-28 Linux

---

Document: cgsnapshot(1) from libcgroup 3.2.0-r10 (Chainguard OS)
Source: https://github.com/libcgroup/libcgroup
