|
Duplicate :
|
|
|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
Currently, the Linux-only Metrics class in jdk/internal/platform/Metrics.java hard-codes cgroups version 1:
/**
* Returns an instance of the Metrics class.
*
* @return Metrics object or null if not supported on this platform.
*/
public static Metrics systemMetrics() {
try {
// We currently only support cgroupv1
Class<?> c = Class.forName("jdk.internal.platform.cgroupv1.Metrics");
[...]
}
For the cgroups v2 effort this needs to be reworked.
On a F31 system with unified hierarchy only, java -XshowSettings:system look like this:
$ bin/java -XshowSettings:system -version
Operating System Metrics:
No metrics available for this platform
openjdk version "14-internal" 2020-03-17
OpenJDK Runtime Environment (fastdebug build 14-internal+0-adhoc.sgehwolf.jdk-jdk)
OpenJDK 64-Bit Server VM (fastdebug build 14-internal+0-adhoc.sgehwolf.jdk-jdk, mixed mode, sharing)
|