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: 2019-09-27
  • Resolved: 2019-09-27
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdResolved
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