public class Cgroup extends Object
| Constructor and Description |
|---|
Cgroup() |
| Modifier and Type | Method and Description |
|---|---|
static int |
getAvailableCpusFromEffectiveCpuSet(String cpuSet)
Calculates the number of available cpus from the cpuset
See https://docs.kernel.org/admin-guide/cgroup-v2.html#cpuset for more information
"0-7" represents 8 cores
"0-4,6,8-10" represents 9 cores (cores 0,1,2,3,4 and core 6 and core 8,9,10)
|
static String |
readSingleLineFile(String path) |
public static int getAvailableCpusFromEffectiveCpuSet(String cpuSet)
cpuSet - a single line from the cgroup cpuset fileCopyright © 2025. All rights reserved.