Snapshot of a subsystem (modeled after a line in /proc/cgroups).
| 92 | |
| 93 | // Snapshot of a subsystem (modeled after a line in /proc/cgroups). |
| 94 | struct SubsystemInfo |
| 95 | { |
| 96 | SubsystemInfo() |
| 97 | : hierarchy(0), |
| 98 | cgroups(0), |
| 99 | enabled(false) {} |
| 100 | |
| 101 | SubsystemInfo(const string& _name, |
| 102 | int _hierarchy, |
| 103 | int _cgroups, |
| 104 | bool _enabled) |
| 105 | : name(_name), |
| 106 | hierarchy(_hierarchy), |
| 107 | cgroups(_cgroups), |
| 108 | enabled(_enabled) {} |
| 109 | |
| 110 | string name; // Name of the subsystem. |
| 111 | int hierarchy; // ID of the hierarchy the subsystem is attached to. |
| 112 | int cgroups; // Number of cgroups for the subsystem. |
| 113 | bool enabled; // Whether the subsystem is enabled or not. |
| 114 | }; |
| 115 | |
| 116 | |
| 117 | // Return information about subsystems on the current machine. We get |