Yatin Baraiya
Yatin Baraiya

Reputation: 91

Identify the running service in Tomcat which use 100% cpu usage

My web-based Java EE application is based on the following technology:

Right now I'm facing the problem that some process of my web application will consume more CPU usage. Sometimes my Tomcat server will use 100% cpu; that's why my PC hangs. I can't identify which process will cause this 100% cpu usage.

Right now I'm looking for any third party application or any utility which provides me the CPU usage information details with name of running process (service), which is running in Tomcat.

Upvotes: 2

Views: 2877

Answers (1)

Nick Rippe
Nick Rippe

Reputation: 6465

Sounds like you're looking for a Java Profiler... I've heard good things about HPROF (takes a little time to get used to, but should provide all the information you need (and it's free). Here are some instructions on HPROF provided by sun.

http://java.sun.com/developer/technicalArticles/Programming/HPROF.html

I haven't personally run it on a server, but I have associates who have to identify problems very much like yours - it should give you what you need.

Also bear in mind that observing the processes will change the performance of the processes - so this isn't something to run in production. See Observer effect

Upvotes: 3

Related Questions