This exposes the procps method to get a process' cgroups.
If the cgroup is not available, we simply return an empty array as this can commonly happen on older kernels using the v1 cgroups (found at /proc/self/cgroups instead of /proc/self/cgroup).
I upgraded procfs to v0.7.1, because prometheus/procfs#399 is required for the tests to work.
Sample output with name: "{{.Comm}}-{{.PID}}-{{.Cgroups}}":
Hi!
This exposes the procps method to get a process' cgroups.
If the cgroup is not available, we simply return an empty array as this can commonly happen on older kernels using the v1 cgroups (found at
/proc/self/cgroups
instead of/proc/self/cgroup
).I upgraded procfs to v0.7.1, because prometheus/procfs#399 is required for the tests to work.
Sample output with
name: "{{.Comm}}-{{.PID}}-{{.Cgroups}}"
: