Saturday, April 9

Thread Dump will be printed to the servers standard out (by default, the shell in which the server is running)

On Windows machine:
cltr + break
On Unix Machine:
get pid using ps -ef grep java
kill -3 (process id)
 

When weblogic is running as windows service
For Out file add in JAVA_OPTIONS:
-Dweblogic.Stdout=

Using beasvc :
beasvc –dump – svcname:”bea Admin_server”

Using Weblogic Admin utility
C:\bea\user_projects\domains\rDomain>java weblogic.Admin -url t3://localhost:7001
-username weblogic -password weblogic THREAD_DUMP

Collecting thread dumps from the console:
Server > Monitoring > Threads > Dump Thread Stacks

Using WLST:
java weblogic.WLST
connect("weblogic","weblogic","t3:\\localhost:7001")
threadDump()

Script to take thread dump prstat and pstack.
#
# Takes an argument (PID of the WLS process) and loops three times.
# This will append the prstat information to a file called dump_high_cpu.txt.
# The thread dump information will either be in file where stdout was redirected or printed on the screen.
#
 
if test $# -eq 0
then
    echo "usage: $0 ";
else
 
                for loopnum in 1 2 3
                do
                        echo `date`
                        CURDATIME=`date '+%y%m%d_%H%M%S'`
                        echo $CURDATIME
                   prstat -L -p $1 1 1 >> ~/export/home/username/`hostname`_${CURDATIME}_$1.out
                   pstack $1  >> ~/export/home/username/`hostname`_${CURDATIME}_$1.out
                   kill -3  $1
                   echo "prstat, pstack, and thread dump done. #" $loopnum
                   sleep 1
                   echo "Done sleeping."
                done

 

Tools to analyze thread dumps (downloads)

No comments:

Post a Comment