Cgroups reads from /proc/ /cgroups and returns a []*Cgroup struct locating this PID in each process control hierarchy running on this system. On every system (v1 and v2), all hierarchies contain all processes, so the len of the returned struct is equal to the number of active hierarchies on this
()
| 90 | // control hierarchy running on this system. On every system (v1 and v2), all hierarchies contain all processes, |
| 91 | // so the len of the returned struct is equal to the number of active hierarchies on this system. |
| 92 | func (p Proc) Cgroups() ([]Cgroup, error) { |
| 93 | data, err := parsers.ReadFileNoStat(p.path("cgroup")) |
| 94 | if err != nil { |
| 95 | return nil, err |
| 96 | } |
| 97 | return parseCgroups(data) |
| 98 | } |
nothing calls this directly
no test coverage detected