You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a recently changes in OpenJ9 the method getSystemCpuLoad() removed from com.ibm.lang.management.OperatingSystemMXBean and inherited from com.sun.management.OperatingSystemMXBean
this cause the ProcessorMetrics.java stop working, which can not return the metric system.cpu.usage
The method detectMethod invoke getDeclaredMethod() it does not return the inherite methods , if change to getMethod will resolve this issue.
@Nullable
private Method detectMethod(String name) {
requireNonNull(name);
if (operatingSystemBeanClass == null) {
return null;
}
try {
// ensure the Bean we have is actually an instance of the interface
operatingSystemBeanClass.cast(operatingSystemBean);
return operatingSystemBeanClass.getDeclaredMethod(name);
}
catch (ClassCastException | NoSuchMethodException | SecurityException e) {
return null;
}
}
Thanks
Bing
The text was updated successfully, but these errors were encountered:
BingTang70
changed the title
The method getSystemCpuLoad() removed from OperatingSystemMXBean.java in v0.33.0 cause ProcessorMetrics does not return metric system.cpu.usage
The method getSystemCpuLoad() removed from OpenJ9 OperatingSystemMXBean.java in v0.33.0 cause ProcessorMetrics does not return metric system.cpu.usage
Aug 10, 2022
shakuzen
changed the title
The method getSystemCpuLoad() removed from OpenJ9 OperatingSystemMXBean.java in v0.33.0 cause ProcessorMetrics does not return metric system.cpu.usage
system.cpu.usage missing with OpenJ9 0.33.0
Aug 15, 2022
Thanks for reporting the issue and sorry for the trouble. I don't think there was a good reason I used getDeclaredMethod instead of getMethod so we can fix that.
Linking to eclipse-openj9/openj9#15685
Hi,
There is a recently changes in OpenJ9 the method
getSystemCpuLoad()
removed fromcom.ibm.lang.management.OperatingSystemMXBean
and inherited fromcom.sun.management.OperatingSystemMXBean
this cause the ProcessorMetrics.java stop working, which can not return the metric system.cpu.usage
The method
detectMethod
invokegetDeclaredMethod()
it does not return the inherite methods , if change togetMethod
will resolve this issue.Thanks
Bing
The text was updated successfully, but these errors were encountered: