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
Window:
Press control+break on the console window where you server instance is running
ps -ef|grep -i java
ps -ef | grep -i <your_server_name>
kill -3 <PID>
java weblogic.Admin -url t3://Managed_Server_Host:7002 -username weblogic -password weblogic THREAD_DUMP
java weblogic.Admin -url t3://Managed_Server_Host:Managed_Server_Port -username weblogic -password weblogic SERVERLOG
Method - 5
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
Window:
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
OR
Identify the process id and kill the process with
( 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.
java weblogic.Admin -url t3://Admin_Server_Host:7001 -username weblogic -password weblogic THREAD_DUMP
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
To take thread dump of manages server running on port 7002
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
Method - 3
Using WLST
Connect with WLST
run setDomainEnv.[sh][cmd]
java weblogic.WLST
At WLST prompt -
# connect with admin serverconnect(‘weblogic’,'webl0gic’,'t3://localhost:7001′)
cd (”Servers’)
ls()
#go inside particular server for which you want to generate thread dumpcd (‘MS1’)
ls()
threadDump()
run setDomainEnv.[sh][cmd]
java weblogic.WLST
At WLST prompt -
# connect with admin serverconnect(‘weblogic’,'webl0gic’,'t3://localhost:7001′)
cd (”Servers’)
ls()
#go inside particular server for which you want to generate thread dumpcd (‘MS1’)
ls()
threadDump()
Method - 4
To take it from console
Login to AdminConsole—>Server —> Monitoring —> Threads
See my this post - http://weblogicserveradministration.blogspot.in/2010/10/monitoring-threads-requests-heap-from.html
Using jrockit mission control
JRCMD
jrcmd <jrockit pid> [<command> [<arguments>]] [-l] [-f file] [-p] -h]
Weblogic Mission Control Diagnostic Command : jrcmd
JRCMD
jrcmd
is a command-line tool included with the JRockit JDK that you can use to send diagnostic commands to a running JVM process. jrcmd
communicates with the JVM by using the JDK attach mechanism. jrcmd <jrockit pid> [<command> [<arguments>]] [-l] [-f file] [-p] -h]
<jrockit pid>
is either the process ID or the name of the Main class that runs the application.
[<
command> [<
arguments>]]
is any diagnostic command and its associated arguments; for example,version
,print_properties
,command_line
.-l
displays the counters exposed by this process.-f
reads and executes commands from the file.-p
lists JRockit JVM processes on the local machine.-h
displays help.
If the PID is 0, commands will be sent to all Jrockit JVM processes.
If no options are given, the default is
-p
List all JRockit JVM processes running on the machine
Run
jrcmd
or jrcmd
-p
to list the running JRockit JVMs
Example:
C:\Oracle\Middleware2\jrockit_160_24_D1.1.2-4\bin>jrcmd -p -version
5932 jrockit.tools.jrcmd.JrCmd -p -version
760 weblogic.Server
Print heap diagnostic
./JROCKIT_HOME/bin/jrcmd PID heap_diagnostics
Prints out a report on the JVM's native memory allocation on the C-Heap
./JROCKIT_HOME/bin/jrcmd PID heapreport
( applicable for R27.x release only )
Prints out a comprehensive summary of garbage collection activity so far during the run
./JROCKIT_HOME/bin/jrcmd PID gcreport
( applicable for R27.x release only )
Take thread dumps
./JROCKIT_HOME/bin/jrcmd PID print_threads
Keywords : weblogic taking thread dump, thread dumps, how to take thread dumps in weblogic, taking thread dumps weblogic
Print Memory Usage
./JROCKIT_HOME/bin/jrcmd PID print_memusage
./JROCKIT_HOME/bin/jrcmd PID print_memusage
No comments:
Post a Comment