JDK-8211848 : OperatingSystemMXBean should be made Container Aware
  • Type: Bug
  • Component: core-svc
  • Sub-Component: javax.management
  • Affected Version: 11
  • Priority: P3
  • Status: Resolved
  • Resolution: Duplicate
  • Submitted: 2018-10-08
  • Updated: 2024-06-04
  • Resolved: 2019-09-27
Related Reports
Duplicate :  
Relates :  
Description
Request from Bob :-

Here's some text for the OperatingSystemMXBean work ...


Synopsis:  OperatingSystemMXBean should be made Container Aware

The com.sun.management.OperatingSystemMXBean provides information about the operating system that the Java process is running on.  If the Java process is running in a docker container, the information returned should be specific to the container but it does not.  The data returned is specific to the host operating system and not the container environment.

There is a new internal API that has been added to JDK 11 (jdk.internal.platform.Metrics) that should be used to extract the information being returned by the OperatingSystemMXBean.

If running in a container, the Metrics APIs should be used to return the OperatingSystemMXBean values, otherwise the existing logic should be used.

Bob.
Comments
duplicate of JDK-8226575
27-09-2019

Not that I know of. I'll change it.
22-07-2019

Is there a reason this CR is confidential?
12-07-2019

Discussion on serviceability-dev: http://mail.openjdk.java.net/pipermail/serviceability-dev/2019-June/028439.html
12-07-2019