I want to learn about the processor usage ( in percent ) of Apache Tomcat server ( 6.x ) using JMX .> There is a ProcessCpuTime attribute for MBean java.lang:OperatingSystem . But how to calculate the percentage of use?
ProcessCpuTime
java.lang:OperatingSystem
Thanks.
Take the difference of the two samples and divide them into time between the samples.
To get the percentage, multiply by 100.
Since you probably want to do this over time, you can use a tool like http://jmxtrans.googlecode.com/ to request Tomcat via JMX and then graph it with graphite.