Thursday, October 14, 2010

Taking Thread Dump

********** This Post is Under Updation **********

Different ways to take weblogic thread dumps

To read thread, thread dump concept read my this post - Thread and Thread Dump

Make sure to take multiple thread dumps withing a short period of time, for example at least 4 to 6 times with a 5 to 20 seconds of interval

Method - 1


Press control+break on the console window where you server instance is running

Linux/Unix based systems 

First, find out the process id of the your server 

ps -ef|grep -i java 


ps -ef | grep -i <your_server_name>
Identify the process id and kill the process with 

kill -3 <PID>

( make sure to this command at least by 4 to 6 times )
Now you will get the thread dump on yout standard output logs file.

Method - 2 

Using weblogic.Admin utility, it's deprecated but still available for you to use.

To take thread dump of admin server running on port 7001

java weblogic.Admin -url t3://Admin_Server_Host:7001 -username weblogic -password weblogic THREAD_DUMP
To take thread dump of manages server  running on port 7002

java weblogic.Admin -url t3://Managed_Server_Host:7002 -username weblogic -password weblogic THREAD_DUMP

Thread dump will go to the standard out file. you can enable"RedirectStdoutToServerLogEnabled" option if you want to see thread dump on same screen where you are running weblogic.admin utility. or if you want thread dump to go to server log then add -Dweblogic.log.RedirectStdoutToServerLogEnabled=true option in you startup script or from the console ( under server > "server startup" option )

Further, you can use below command to read thread dump from log file

java weblogic.Admin -url t3://Managed_Server_Host:Managed_Server_Port -username weblogic -password weblogic SERVERLOG
Method - 3
Using WLST

Connect with WLST

run setDomainEnv.[sh][cmd]

java weblogic.WLST

At WLST prompt - 

# connect with admin server
cd (”Servers’)
#go inside particular server for which you want to generate thread dump

cd (‘MS1’)
Method - 4 
To take it from console

Login to AdminConsole—>Server —> Monitoring —> Threads


  1. This comment has been removed by a blog administrator.

  2. This comment has been removed by a blog administrator.