CGSNAPSHOT(1)

πŸ’– CGSNAPSHOT β€” the libcgroup manual, but make it cute πŸ’–

okay so bestie, you know that one tool in section 1 of the libcgroup manual? yeah. cgsnapshot. she's the moment. let's get into it 🫢


✨ NAME ✨

cgsnapshot β€” generate the configuration file for given controllers πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

cgsnapshot [-h] [-s] [-t] [-b file] [-w file] [-f output_file]
[controller] [...]

🌸 DESCRIPTION 🌸

okay so here's the tea: cgsnapshot generates the cgconfig compatible configuration file for the controllers you give it. that's literally her whole job and she eats every time. πŸ‘‘

if you don't set any controller? no worries, she just shows all mounted hierarchies. so chill of her honestly.

and the output? it's in the same format as the cgconfig.conf configuration file. consistency queen. ✨


πŸ’« the options, bestie πŸ’«

  • -b file β€” 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 β€” display this help and exit. the classic. the icon. πŸŽ€
  • -f, --file β€” Redirect the output to output_file. so like, send it somewhere else. πŸ¦‹
  • -s, --silent β€” Ignore all warnings. shhh. not a peep. 🀫
  • -t, --strict β€” Do not display the variables which are not on the allowlist. she said no exceptions, periodt. πŸ’…
  • -w file β€” 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. 😭
lowkey important: the warning message can be omitted using the -s, --silent flag. and if the -t, --strict flag is used, the variable which is not on the allowlist is not displayed. 🫢
  • controller β€” defines the controller whose hierarchies will be output. tell her which one you want, bestie. 🧚

🌈 ENVIRONMENT VARIABLES 🌈

  • CGROUP_LOGLEVEL β€” controls verbosity of the tool. Allowed values are DEBUG, INFO, WARNING or ERROR. pick your vibe check. ⭐

πŸ“ FILES πŸ“

  • /etc/cgsnapshot_denylist.conf β€” default denylist πŸ’€
  • /etc/cgsnapshot_allowlist.conf β€” default allowlist ✨
  • /etc/cgconfig.conf β€” default libcgroup configuration file πŸ’œ

πŸ‘‘ EXAMPLES πŸ‘‘

okay these are the moments, fr fr:

cgsnapshot -s -f /etc/cgconfig.conf.cgsnapshot

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

cgsnapshot -s -f /etc/cgconfig.conf.cgsnapshot cpu

create configuration file which contains hierarchy containing cpu controller and all its control groups on the actual system. just cpu, just vibes. πŸ”₯


πŸ” SEE ALSO πŸ”

cgconfig.conf (5) β€” go read her too, iykyk πŸ¦‹


and that's the whole page bestie!! this one's from the libcgroup Manual, dated 2010-07-28, on Linux β€” and look at her, still iconic after all this time. πŸ˜­πŸ’– mwah, go snapshot something. πŸŽ€βœ¨

πŸ“¦ where this page comes from