The overview tab of a process on jconsole shows me the CPU Usage percentage. Is there a MBean that gives me this value? What is its ObjectName?
A:
There does not seem to be a direct MBean within ManagementFactory. The closest is http://java.sun.com/javase/6/docs/api/java/lang/management/OperatingSystemMXBean.html#getSystemLoadAverage() which can be used to calculate the CPU used by the whole system.
However this URL has suggested a method based on the source code of jconsole
JoseK
2010-06-16 12:33:25
Not the (simple) solution I wanted, but seems to be the only way.
tuler
2010-06-16 14:40:43