cgget
Get cgroup parameters
SYNOPSIS
cgget [options] cgroup [controller] ...
PARAMETERS
-v, --version
Display the version information of the cgget utility.
-h, --help
Show the help message and exit.
-r <name>, --recursive=<name>
Recursively read the specified parameter <name> for the cgroup and its children.
-a, --all-controllers
Read parameters for all controllers attached to the specified cgroup.
-g <controller>:<cgroup>, --group=<controller>:<cgroup>
Specifies the cgroup and its controller to work with. This is an alternative way to define the target cgroup and controller.
-R, --recursive
Recursively read all parameters for all controllers in the specified cgroup and its children. This is a broader version of -r.
-n, --numeric
Display numeric values for parameters where applicable, rather than human-readable ones.
-s, --skip-empty
Skip displaying parameters that have empty values, making the output more concise.
-f <file>, --file=<file>
Read parameters from a specific file within the cgroup filesystem, rather than automatically discovering them based on the controller.
-l, --list-parameters
List all valid parameters for the given cgroup and controller, without actually retrieving their values. Useful for discovering available attributes.
DESCRIPTION
cgget is a utility from the libcgroup tools suite designed to retrieve and display parameters or attributes associated with control groups (cgroups). Cgroups are a Linux kernel feature that allows for the allocation, prioritization, denial, management, and monitoring of system resources among groups of processes. cgget enables administrators and users to inspect the current state and configuration of specific cgroups or controllers within a cgroup hierarchy. It can show attributes for an entire cgroup, or specific controllers (subsystems) attached to it, providing insights into resource limits, usage, and other operational data. It's an essential tool for monitoring and troubleshooting cgroup configurations.
CAVEATS
- cgget requires the cgroup filesystem to be properly mounted to access cgroup information.
- Appropriate read permissions are necessary to query cgroup files; lack of permissions will result in errors.
- The output format and available parameters are dependent on the specific kernel version and the active cgroup controllers.
- Interpreting the output requires a basic understanding of cgroup controllers (e.g., cpu, memory, blkio) and their respective parameters.
HISTORY
The cgget command is part of the libcgroup tools, which were developed to provide a user-space interface for managing Linux Control Groups (cgroups). Cgroups were introduced into the Linux kernel starting around version 2.6.24. The libcgroup project and its utilities like cgget emerged to simplify interaction with this powerful kernel feature, allowing system administrators and developers to easily inspect and configure resource management policies for processes. Its usage has grown alongside the increasing adoption of cgroups for containerization technologies, such as Docker and LXC, and for general system resource management.


