Hi,
I was investigating how to get the linux_proc pmda to generate cgroup metrics
for child cgroups (in my case to view the cgroups created by slurm). The source
code in cgroup.c in the linux_proc pmda appeared to support creating metrics
for child cgroups, but the pmda was not producing any of these metrics on my
system.
The problem was caused because the full directory path (including the mount
point) is passed to cgroup_scan() when it is called recursively. The
recursively called cgroup_scan() prepends the mount point again to the path and
then fails trying to open the non-existant directory. There was also a
follow-on bug where the cgroupname was not set correctly when processing a
subdirectory.
I have attached a patch with my suggested fix for this problem. The change
enables the pmda to parse cgroup subdirectories and create metrics for all the
child cgroups. I'd be grateful if you could review my proposed changes.
0001-Updated-cgroup-directory-parser-to-process-child-cgr.patch
Description: 0001-Updated-cgroup-directory-parser-to-process-child-cgr.patch
ATT00001.txt
Description: ATT00001.txt
|