feat: Add cgroup v2 support for accurate container resource monitoring
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 61
- Forks
- 40
- PR merge metrics
- No merged PRs in 30d
Description
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/himplementingImonitorinterface - 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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the existing monitor components and the Imonitor interface before designing cgroupmon.cpp/h. Check how sources under /sys/fs/cgroup/ and /proc are currently handled, then plan unit tests with precooked sources and Docker/Kubernetes integration tests. Done means cgroup v1/v2 detection, limits and CPU, memory, and I/O statistics, fallback behavior, and updates to README and ADDING_MONITORS.md.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, docker, kubernetes, linux
- Domain
- devops, observability-sre, operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100