Skip to content

Container aware stats - #7

Merged
dhamith93 merged 4 commits into
masterfrom
improvements_container_aware_stats
Sep 21, 2026
Merged

dhamith93 merged 4 commits into
masterfrom
improvements_container_aware_stats

Conversation

@dhamith93

Copy link
Copy Markdown
Owner

Container-aware memory and CPU stats

This adds an opt-in mode that reads the calling process's own cgroup instead.

syStats := systats.New()
syStats.ContainerAware = true
mem, _ := syStats.GetMemory(systats.Megabyte)
// mem.Limited == true, mem.Total is the cgroup limit, not host RAM

@dhamith93
dhamith93 merged commit c54669a into master Sep 21, 2026
1 check passed
@dhamith93
dhamith93 deleted the improvements_container_aware_stats branch September 22, 2026 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant