Thursday, 11 October 2012

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]

  1. <jrockit pid>
  2.  is either the process ID or the name of the Main class that runs the application.
  3. [<command> [<arguments>]] is any diagnostic command and its associated arguments; for example, versionprint_propertiescommand_line.
  4. -l displays the counters exposed by this process.
  5. -f reads and executes commands from the file.
  6. -p lists JRockit JVM processes on the local machine.
  7. -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







No comments:

Post a Comment