Skip to content

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

@DhanashreePetare

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions