Reputation: 7939
I have a production system running on three tomcat servers. Suddenly one of my tomcat server is showing 100% CPU usage which I have taken out of pool.
Can any one guide on how can I start to debug this issue? Any tools / utilities?
Thanks, Harish
Upvotes: 4
Views: 11626
Reputation: 26713
Have a look at JTop, it's like unix top
but for threads within a JVM.
Upvotes: 1
Reputation: 272237
The first thing I'd try is to get a thread dump and see what's running.
From this article:
Generating Java Thread Dumps Thread Dump is generated by sending a SIGQUIT signal to the JVM process. There are different ways of sending this signal to the process.
In Unix, use "kill -3 " where pid is the Process ID of the JVM.
In Windows, press CTRL+BREAK on the window where the JVM is running
This will at least show you which threads in your applications are running, and give you a basic indication as to what's going on. jstack will provide anothe rmeans of getting this info, and is perhaps easier for server processes disconnected from the console.
A more detailed report can be obtained by using VisualVM to report on thread/CPU + memory usage.
Upvotes: 2