Skip to content

feat: Add cgroup v2 support for accurate container resource monitoring #276

Open

Description

@DhanashreePetare

Problem

Modern Linux distributions and containers (Docker/Kubernetes) use cgroup v2. Current prmon monitoring has reduced accuracy in containerized environments and cannot detect container resource limits.

Proposed Solution

Add new cgroupmon monitor component that:

  • Auto-detects and reads from cgroup v1/v2 (/sys/fs/cgroup/)
  • Provides accurate CPU, memory, I/O stats for containers
  • Reports container limits and quotas
  • Maintains backward compatibility with non-container environments

Expected Deliverables

  • cgroupmon.cpp/h implementing Imonitor interface
  • Support for both cgroup v1 and v2
  • Auto-detection with fallback to /proc
  • Unit tests with precooked sources
  • Integration tests in Docker/Kubernetes
  • Documentation updates (README, ADDING_MONITORS.md)

Benefits

  • Accurate monitoring in modern container platforms
  • Lightweight implementation (no new dependencies)
  • Suitable for HEP workflows in Kubernetes

Activity

  1. AdityaTakuli commented on Feb 17, 2026

    @AdityaTakuli
    Contributor

    Hi, I’d like to work on this issue.
    I plan to implement the cgroup v1/v2 auto-detection and container quota reporting as described.
    Please let me know if there are any design constraints I should follow.

  2. graeme-a-stewart commented on Feb 18, 2026

    @graeme-a-stewart
    Member

    Hello @iareARiES - we already have a PR for this issue (#277), which is being reviewed. Thanks for your interest in the project though. The issue #243 is open for contributions - let us know if you'd like to tackle that one.

  3. added this to the v3.3 milestone on Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions