![]() ![]() ![]() ![]() ![]() ![]() |
The Oracle JRockit Mission Control Client 3.1.0 tools suite includes tools to monitor, manage, profile, and eliminate memory leaks in your Java application without introducing the performance overhead normally associated with these types of tools.
This section contains information on the following subjects:
JRockit Mission Control 3.1.0 contains a large number of new features that will provide more information more seamlessly and improve the overall user experience. For descriptions of these features, please refer to New Features and Enhancements in this Release at:
With the new Rich Client Platform (RCP) based JRockit Mission Control, you can launch the Memory Leak Detector, the JRockit Runtime Analyzer, and the JRockit Management Console from within the JRockit Mission Control. Figure 5-1 depicts how JRockit Mission Control looks when all tools are loaded.
When a JRA recording is started from within the JRockit Mission Control Client, it records the status of the JRockit JVM process for the time that you have specified and creates a ZIP file containing an XML file with the recorded data and optionally a binary file with latency data together with the corresponding data producer specification files. The ZIP file is automatically opened in the JRockit Runtime Analyzer tool upon completion of the recording, valid for JDK level 1.5 and later (marked 5 in Figure 5-1). Typical information that is recorded during a JRA recording is Java heap distribution, garbage collections, method samples, and lock profiling information (optional). New for the Oracle JRockit Mission Control 3.1.0 release, is that you can also record thread latency data. When viewing Latency data in the JRA Tool, the Latency Events Details become visible (marked 2 in Figure 5-1).
To view real-time behavior of your application and of Oracle JRockit JVM, you can connect to an instance of the JRockit JVM and view real-time information through the JRockit Management Console (marked 4 in Figure 5-1). Typical data that you can view is thread usage, CPU usage, and memory usage. All graphs are configurable and you can both add your own attributes and redefine their respective labels. In the Management Console you can also create rules that trigger on certain events, for example, an mail will be sent if the CPU reaches 90% of the size.
With the JMX Agent you have access to all MBeans deployed in the platform MBean server. From these MBeans, you can read attribute information, such as garbage collection pause times.
To find memory leaks in your Java application, you connect the JRockit Memory Leak Detector to the running JRockit JVM process. The Memory Leak Detector connects to the JMX (RMP) Agent that instructs to start a Memory Leak server where all further communication takes place.
The JRockit Mission Control Client executable is located in JROCKIT_HOME/bin
. If this directory is on your system path, you can start the JRockit Mission Control Client by simply typing jrmc
in a command (shell) prompt.
Otherwise, you have to type the full path to the executable file, as shown below:
JROCKIT_HOME\bin\jrmc.exe
(Windows)JROCKIT_HOME/bin/jrmc
(Linux)
On Windows installations, you can start JRockit Mission Control from the Start menu.
The JRockit Browser (see Figure 5-2) was new for the JRockit Mission Control 2.0 release. This tool allows you to set up and manage all running instances of JRockit JVM on your system. From the JRockit Browser you activate different tools, such as starting a JRA recording, connecting a Management Console, and starting memory leak detection. Each JRockit JVM instance is referred to as a Connector.
The JRockit Management Console (see Figure 5-3) is used to monitor a JRockit JVM instance. Several Management Consoles can be running concurrently side by side. The tool captures and presents live data about memory, CPU usage, and other runtime metrics. For the Management Console that is connected to JRockit JDK 5.0, information from any JMX MBean deployed in the Oracle JRockit JVM internal MBean server can be displayed as well. For a Console connected to Oracle JRockit JDK 1.4, RMP capabilities are exposed by a JMX proxy. JVM management includes dynamic control over CPU affinity, garbage collection strategy, memory pool sizes, and more.
The JRockit Runtime Analyzer (see Figure 5-4) is an on-demand “flight recorder” that produces detailed recordings about the JVM and the application it is running. The recorded profile can later be analyzed off line, using the JRA. Recorded data includes profiling of methods and locks, as well as garbage collection statistics, optimization decisions, and event latencies.
Note: | The Memory Leak Detector is not encrypted; therefore, you should never use it on a public network. An encryption protocol will be available in a future edition of this product. |
The JRockit Memory Leak Detector (see Figure 5-5) is a tool for discovering and finding the cause for memory leaks in a Java application. The JRockit Memory Leak Detector’s trend analyzer discovers slow leaks, it shows detailed heap statistics (including referring types and instances to leaking objects), allocation sites, and it provides a quick drill down to the cause of the memory leak. The Memory Leak Detector uses advanced graphical presentation techniques to make it easier to navigate and understand the sometimes complex information.
![]() ![]() ![]() |