Subsystems returns a complete list of the default cgroups available on most linux systems
()
| 47 | // Subsystems returns a complete list of the default cgroups |
| 48 | // available on most linux systems |
| 49 | func Subsystems() []Name { |
| 50 | n := []Name{ |
| 51 | Freezer, |
| 52 | Pids, |
| 53 | NetCLS, |
| 54 | NetPrio, |
| 55 | PerfEvent, |
| 56 | Cpuset, |
| 57 | Cpu, |
| 58 | Cpuacct, |
| 59 | Memory, |
| 60 | Blkio, |
| 61 | Rdma, |
| 62 | } |
| 63 | if !userns.RunningInUserNS() { |
| 64 | n = append(n, Devices) |
| 65 | } |
| 66 | if _, err := os.Stat("/sys/kernel/mm/hugepages"); err == nil { |
| 67 | n = append(n, Hugetlb) |
| 68 | } |
| 69 | return n |
| 70 | } |
| 71 | |
| 72 | type Subsystem interface { |
| 73 | Name() Name |
searching dependent graphs…