Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

how ro get a java thread dump of a application

 
Ranch Hand
Posts: 256
Netbeans IDE Firefox Browser Fedora
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

Please suggest how ro get a java thread dump of a application deployed in WL10 in windows enviroment.


Thanks,
-Ricky
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This article tells how: An Introduction to Java Stack Traces
 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
open the console and click on the server(s) that has the stuck threads. click the monitoring tab and click on performance tab in the monitoring tab. then click dump thread stacks.

OR

kill -3 process_name. Do this 3 times i.e

kill -3 process_name
kill -3 process_name
kill -3 process_name
 
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

one thing to consider is that Thread dumps are redirected to server standard out. So if you're under unix environment and take the thread dump with kill -3 [PID] command you need to have redirected the standard out to a file. This usually is done using the nohup command while starting the server.


If you have nodemangaer starting your servers the standart out is redirected to $DOMAIN_HOME/servers/$SERVER_NAME/logs/$SERVER_NAME.out

[]s

 
Ramakanta Sahoo
Ranch Hand
Posts: 256
Netbeans IDE Firefox Browser Fedora
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Joe Ess wrote:This article tells how: An Introduction to Java Stack Traces



Hi Joe Thanks for info I have been through this also.
But this wont work as the Wl server is not running and Managed server is through windows service only.


open the console and click on the server(s) that has the stuck threads. click the monitoring tab and click on performance tab in the monitoring tab. then click dump thread stacks


Amit this also wont work as there is no admin server or node manager to monitor.
Kill -3 is for unix env.

One more easy step is in UNIX env. 1.5 JDK and in WINDOWS 1.6 JDK
run below commands to get thread dump.( All needs to be running in command line only else you wont get any PID)
jps -l (Java process list)
jstack -l PID (This will give you total thread dump)
Its not applicable for me too as its windows env., 1.5 JDK and only Managed server is running and that to in service mode only.

The problem is only Managed Server is running and its only as service.

I got a good solution to this... just posting for future reference of users.

Start wlst.cmd tool
It will be in offline mode
connect to the managed server and make it online.
execute threadDump();
this will create a file named Thread_Dump_<ManagedServerName>.txt in local directory.
Thats all get the file and check it out. Full Dump any time.

Thanks All,
-Ricky
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic