containerd/cgroups

stats/v1: Missing memory.oom_control fields

vermavis opened this issue · 1 comments

Hi,

I am playing with containerd package in our environment which is configured with cgroupv1. In our environment, we would like to have oom_kill metric from memory.oom_control to understand the # of times a process under a given cgroup has been killed due to oom. I notice we do have memory.events fields of the memory controller already taken care of in v2/stats. However, if someone is still using v1/stats, then they would not find those fields related to oom. Cgroupv1 has different name of this file (memory.oom_control). Would be great to include those metrics for v1 (although it has gone old now).

Thanks,
Vishal

I took a stab at solving this in this PR: #177
If someone could please help review it, that would be great. Also, I wouldn't be surprised if I missed some pieces. Looking forward to the review. Thanks in advance.