Interface CgroupDiscoverer
- All Known Implementing Classes:
ProcCgroupDiscoverer,ProcCgroupV2Discoverer,ProcSelfCgroupDiscoverer
public interface CgroupDiscoverer
-
Method Summary
Modifier and TypeMethodDescriptionReturns a path for a specific cgroup.Gets CPU metrics (shares, quota, period, usage) appropriate for this cgroups version.Gets CPU set metrics (effective CPU list) appropriate for this cgroups version.
-
Method Details
-
discover
Returns a path for a specific cgroup. This path should contain the interesting cgroup files without further traversing needed.- Parameters:
cgroup- The cgroup- Returns:
- The path that contains that cgroup's interesting bits.
-
getCpuMetrics
Cpu.CpuMetrics getCpuMetrics()Gets CPU metrics (shares, quota, period, usage) appropriate for this cgroups version. Encapsulates the difference between v1 (cpu.shares, cpu.cfs_*) and v2 (cpu.weight, cpu.max).- Returns:
- CPU metrics compatible with both cgroups v1 and v2
-
getCpuSetMetrics
CpuSet.CpuSetMetric getCpuSetMetrics()Gets CPU set metrics (effective CPU list) appropriate for this cgroups version. Encapsulates the difference between v1 (cpuset.effective_cpus) and v2 (cpuset.cpus.effective).- Returns:
- CPU set metrics compatible with both cgroups v1 and v2
-
getCgroupVersion
CgroupVersion getCgroupVersion()
-