We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ccce69e commit d738318Copy full SHA for d738318
dubbo-common/src/main/java/org/apache/dubbo/common/status/support/LoadStatusChecker.java
@@ -37,6 +37,11 @@ public Status check() {
37
try {
38
Method method = OperatingSystemMXBean.class.getMethod("getSystemLoadAverage", new Class<?>[0]);
39
load = (Double) method.invoke(operatingSystemMXBean, new Object[0]);
40
+ if (load == -1) {
41
+ com.sun.management.OperatingSystemMXBean bean =
42
+ (com.sun.management.OperatingSystemMXBean) operatingSystemMXBean;
43
+ load = bean.getSystemCpuLoad();
44
+ }
45
} catch (Throwable e) {
46
load = -1;
47
}
0 commit comments