pcp
[Top] [All Lists]

Processing cgroup subdirectories in linux_proc pmda

To: PCP Mailing List <pcp@xxxxxxxxxxx>
Subject: Processing cgroup subdirectories in linux_proc pmda
From: "White, Joseph" <jpwhite4@xxxxxxxxxxx>
Date: Fri, 20 Sep 2013 10:19:34 -0400
Accept-language: en-US
Acceptlanguage: en-US
Delivered-to: pcp@xxxxxxxxxxx
Thread-index: Ac62DG5L6Wvq5CADSxWjm3k7vhjxuw==
Thread-topic: Processing cgroup subdirectories in linux_proc pmda
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.

Attachment: 0001-Updated-cgroup-directory-parser-to-process-child-cgr.patch
Description: 0001-Updated-cgroup-directory-parser-to-process-child-cgr.patch

Attachment: ATT00001.txt
Description: ATT00001.txt

<Prev in Thread] Current Thread [Next in Thread>