[Java SE] OperatingSystemMXBean.getSystemCpuLoad() Method Returns Incorrect Value in Containers
(Doc ID 2860378.1)
Last updated on MAY 06, 2022
Applies to:Java SE JDK and JRE - Version 8 to 11
Information in this document applies to any platform.
For applications that implement the Oracle JDK OperatingSystemMXBean Interface in containers, the OperatingSystemMXBean.getSystemCpuLoad() method may return an incorrect value. When the CPU load reaches 100%, the OperatingSystemMXBean.getSystemCpuLoad() method returns a value of 1 to indicate the CPU load is 100%. However, the OperatingSystemMXBean.getSystemCpuLoad()continues to return a value of 1 throughout the rest of the runtime, even though the actual CPU load has decreased.
To reproduce the issue, use the test case from JDK-8265836 with:
- Oracle Java SE 8 Update 321 b33 or older release; or
- Oracle Java SE 11.0.13 or older release
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!
In this Document