What is Oracle JRMC ( JRockit Mission Control Tool ) ?
Oracle JRockit Mission Control Client is a tools introduced Oracle JRockit JVM R26.0.0. onwards.
It is used to monitor, manage, profile, and eliminate memory leaks in your Java application without introducing the performance overhead normally associated with these types of tools.
It came with current versions of Weblogic however you can down it and install it separately also if not already there.
Benefits & Features of JRMC :
The JRockit Mission Control’s low performance overhead is a result of using data collected as part of the JRockit JVM’s normal adaptive dynamic optimization. This also eliminates the problem with the Heisenberg anomaly that can occur when tools using byte code instrumentation alters the execution characteristics of the system. The JRockit Mission Control functionality can always be available on-demand and the small performance overhead is only in effect while the tools are running.
There are lots of features and benefits of using JRMC, few major functions are :
The Flight Recorder
Have you ever wondered what really happens in a running Java program? Have you ever wanted to "go back in time" and analyze what happened right before a problem occurred in your system? Do you want an extremely detailed level of profiling without impacting performance? JRockit Flight Recorder has been engineered to meet all of these goals.
JRockit Flight Recorder does all this by being tightly integrated into the core of the JVM itself and by being very conscious of its performance overhead. JRockit Flight Recorder provides a wealth of information on the inner workings of the JVM as well as on the Java program running in the JVM. You can use this information for profiling and for root cause analysis of problems. Furthermore, JRockit Flight Recorder can be enabled at all times, without causing performance overhead—even in heavily loaded, live production environments.
While capturing details about the JVM, the JRockit Flight Recorder has also been tightly integrated into Oracle's Fusion Middleware family of products and provides a full stack view of the system. Everything from Java servlets and database execution at a high level to fine-grained information on thread synchronization and garbage collections is available at your fingertips.
JRockit Flight Recorder is comprised of a recording engine, which sits inside the JVM, and the JRockit Mission Control client. The engine produces a recording file which can later be analyzed through the client.
The Management Console
It's a real-time GUI based interface for your application and for Oracle JRockit JVM, you can connect with an JVM and view all real-time information via
it, like thread usage, CPU usage, memory usage etc. Graphs are configurable, means you can add your own attributes and redefine their respective labels, also via Management Console you can also create rules that trigger
on certain events like an mail will be sent if CPU reaches 90% usage.
The Memory Leak Detector
It's a very useful tool to detect the memory leaks in you Java application, you can connect to the JRockit Memory Leak Detector to a running JRockit JVM process.
Memory Leak Detector connects to the JMX (RMP) Agent that instructs to start a Memory Leak server where all further communication takes place.
How to Start JRMC Console ?
JRMC executable is located in JROCKIT_HOME/bin directory. You can start JRockit Mission Control by directly invoking the -
JROCKIT_HOME\bin\jrmc.exe On Windows, or you can start from windows start menu also.
JROCKIT_HOME/bin/jrmc On Linux
If you have installed jrmc with weblogic then you can start it from -
$ORACLE_HOME\<Jrockit_directory>\bin\jrmc.exe
like, in my case it's C:\Oracle\Middleware2\jrockit_160_24_D1.1.2-4\bin\jrmc.exe
Keywords : jrockit mission control start, jrockit management console
Important :
If you are using JRockitR 27.x and Mission Control 3.x (JRMC3.x) it is called JRA recording.
If you are using JRockitR 28.x and Mission Control 4.x (JRMC4.x) then it is called JFR (JRockit Flight Recording).
Check version of JRMC
You can check your jrmc version with
jrmc -version
you will get output like this
Oracle JRockit(R) Mission Control(TM) 4.0 (for JRockit R28.0.0)
java.vm.version = R28.1.3-11-141760-1.6.0_24-20110301-1432-linux-x86_64
build = M4.0.1-19
chno = 134472
jrmc.fullversion = 4.0.1
jrmc.version = 4.0
jrockit.version = R28.0.0
year = 2010
keywords - jrockit mission control latest version, jrockit mission control version, jrockit mission control latest version, jrockit mission control latest version
JFR & JRA recording : using command line
To start a recording -
[A]
First identify the PID of your jvm
Windows - Check it via task manager ( enable PID option via view > select columns and check pid for java.exe processes )
Unix/Linux - ps -ef|grep -i <your_server_name>
[B]
For R28.x :
jrcmd 760 start_flightrecording name=Test duration=1m filename=D:\myjfrRec.jfr
Here 760 is the PID of my managed server
For R27.X
jrcmd 760 jrarecording filename=D:\myjra.xml time=60 nativesamples=true
To check the status of recording
jrcmd 760 check_flightrecording
this command will check status of all currently running and previously completed recordings for pid 760
Make sure to execute it before a recording ends to check status of currently running recording
Stopping a Recording
If you start a recording with the duration option then it will automatically stop after that time.
but you can also start a recording without specifying a duration, in which case it will run until explicitly stopped using the stop_flightrecording diagnostic command.
jrcmd 760 stop_flightrecording recording=4
where 1 ( in recording=1 ) is the recording id created during starting of a recording and displayed in output or you can check with above mentioned status command
Example - to stop a recording with id 4 earlier started for pid 760
jrcmd 760 stop_flightrecording recording=4
FOR MORE OPTIONS STAY TUNED OR WRITE ME WHAT OPTION YOU WANT TO ADD FURTHER :)
keywords - oracle jrockit flight recorder,
use parameter -XX:FlightRecorderOptions=defaultrecording=false
ReplyDelete