My Oracle Support Banner

[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.

Symptoms

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:

Cause

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
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.