diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/status/support/LoadStatusChecker.java b/dubbo-common/src/main/java/org/apache/dubbo/common/status/support/LoadStatusChecker.java index 7f91255ad3e..c5e2204a896 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/common/status/support/LoadStatusChecker.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/common/status/support/LoadStatusChecker.java @@ -37,6 +37,11 @@ public Status check() { try { Method method = OperatingSystemMXBean.class.getMethod("getSystemLoadAverage", new Class[0]); load = (Double) method.invoke(operatingSystemMXBean, new Object[0]); + if (load == -1) { + com.sun.management.OperatingSystemMXBean bean = + (com.sun.management.OperatingSystemMXBean) operatingSystemMXBean; + load = bean.getSystemCpuLoad(); + } } catch (Throwable e) { load = -1; }