CPU Usage Percentage Tomcat JMX

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?

Thanks.

+4
source share
2 answers

Take the difference of the two samples and divide them into time between the samples.

To get the percentage, multiply by 100.

+6
source

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.

0
source

All Articles