Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to get Thread Dump in Tomcat Windows 32-bit

 
Ramakanta Sahoo
Ranch Hand
Posts: 256
Fedora Firefox Browser Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I'm running Tomcat 5.0.28 in Windows machine and tomcat is running as a service.
JDK Version Sun JDK 1.4.2_13
I got a problem my app in Tomcat server crashed and i want a tread dump from tomcat server.


I know in Windos CTRL+BREAK will give a thread dump if it runs from command prompt and in Linux kill -3 PID but non of these are possible fo me.
jstack also only available in windows from 1.6.
I cant use any third party tools also.
Is there any other way to get a thread dump. ???
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Code to print a list of all threads is at http://faq.javaranch.com/java/ThreadLister. It's easy to turn that into a servlet that you can hit whenever you need a thread dump (in this case it would even be OK to make it a JSP page that needs no mapping in web.xml).
 
Ramakanta Sahoo
Ranch Hand
Posts: 256
Fedora Firefox Browser Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:Code to print a list of all threads is at http://faq.javaranch.com/java/ThreadLister. It's easy to turn that into a servlet that you can hit whenever you need a thread dump (in this case it would even be OK to make it a JSP page that needs no mapping in web.xml).


Thank you so much but I dont know JSP.
How I will be able to convert it to JSP.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic