Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Raw cgroups plugin

The cgroups plugin gathers measurements about Linux control groups.

Requirements

  • Control groups v1 or v2. Some metrics may not be available with cgroups v1.

Metrics

Here are the metrics collected by the plugin's sources.

NameTypeUnitDescriptionResourceResourceConsumerAttributes
cpu_time_deltaDeltananosecondstime spent by the pod executing on the CPULocalMachineCgroupsee below
cpu_percentGaugePercent (0 to 100)cpu_time_delta / delta_t (1 core used fully = 100%)LocalMachineCgroupsee below
memory_usageGaugeBytestotal pod's memory usageLocalMachineCgroupsee below
cgroup_memory_anonymousGaugeBytesanonymous memory usageLocalMachineCgroupsee below
cgroup_memory_fileGaugeBytesmemory used to cache filesystem dataLocalMachineCgroupsee below
cgroup_memory_kernel_stackGaugeBytesmemory allocated to kernel stacksLocalMachineCgroupsee below
cgroup_memory_pagetablesGaugeBytesmemory reserved for the page tablesLocalMachineCgroupsee below

Attributes

The cpu measurements have an additional attribute kind, which can be one of:

  • total: time spent in kernel and user mode
  • system: time spent in kernel mode only
  • user: time spent in user mode only

Configuration

Here is an example of how to configure this plugin. Put the following in the configuration file of the Alumet agent (usually alumet-config.toml).

[plugins.cgroups]
# Interval between each measurement.
poll_interval = "1s"

Automatic Detection

The version of the control groups and the mount point of the cgroupfs are automatically detected.

The plugin watches for the creation and deletion of cgroups. With cgroup v2, the detection is almost instantaneous, because it relies on inotify. With cgroup v1, however, cgroups are repeatedly polled. The refresh interval is 30s, and it is currently not possible to change it in the plugin's configuration.

More information

To monitor HPC jobs or Kubernetes pods, use the OAR, Slurm or K8S plugins. They provide more information about the jobs/pods, such as their id.