简体   繁体   中英

Tomcat JMX CPU Usage Percentage

I want to find out CPU usage ( in Percentage ) of an Apache Tomcat Server( 6.x ) using JMX .
There is an attribute ProcessCpuTime of MBean java.lang:OperatingSystem . But, how to calculate usage percentage from it?

Thanks.

Take the difference of two samples and divide by the time between samples.

To get a percentage, multiply by 100.

由于您可能希望随着时间的推移这样做,您可以使用http://jmxtrans.googlecode.com/等工具通过JMX查询Tomcat,然后使用Graphite进行图形化。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM