JDK-8236876 : Release Note: OperatingSystemMXBean Methods Inside a Container Return Container Specific Data
  • Type: Sub-task
  • Component: core-svc
  • Sub-Component: java.lang.management
  • Affected Version: 8u261,11.0.8-oracle,14
  • Priority: P4
  • Status: Closed
  • Resolution: Delivered
  • Submitted: 2020-01-09
  • Updated: 2021-12-02
  • Resolved: 2021-12-02
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.
JDK 11 JDK 14 JDK 8
11.0.8-oracleResolved 14Resolved 8u261Resolved
Description
When executing in a container, or other virtualized operating environment, the following `OperatingSystemMXBean` methods in this release return container specific information, if available. Otherwise, they return host specific data:

- `getFreePhysicalMemorySize()`
- `getTotalPhysicalMemorySize()`
- `getFreeSwapSpaceSize()`
- `getTotalSwapSpaceSize()`
- `getSystemCpuLoad()`