Monitor and manage Java workloads with Java Flight Recorder (JFR) and Zulu Mission Control
This articles shows you how to monitor and manage Java workloads with Java Flight Recorder (JFR) and Zulu Mission Control.
Zulu Mission Control is a fully-tested build of JDK Mission Control, which was open sourced by Oracle in 2018 and is managed as a project under the OpenJDK umbrella. Coupled with Flight Recorder, Mission Control delivers low-overhead, interactive monitoring and management capabilities for Java workloads.
Zulu Mission Control is compatible with the following JDKs/JREs:
- Zulu 12.1 and later
- Zulu 11.0 and later
- Zulu 8u202 (8.36) and later
- Oracle OpenJDK 11+15 and later
- Oracle Java 11.0 and later
- Oracle Java 8.0 and later
Follow the steps below to install Zulu Mission Control, connect to a Java Virtual Machine (JVM), and gain real-time visibility into all aspects of a running application.
Download Zulu Mission Control from the Azul download site, choose the appropriate version for your system, save it locally, and change to that directory.
Expand the downloaded file.
tar -xzvf zmc7.0.0-EA-linux_x64.tar.gz
unzip -zxvf zmc7.0.0-EA-win_x64.zip
tar -xzvf zmc7.0.0-EA-macosx_x64.tar.gz
Start your Java application using one of the compatible JDKs. E.g.:
$JAVA_HOME/bin/java -jar MyApplication.jar
Start Zulu Mission Control
zmc7.0.0-EA-macosx_x64/Zulu\ Mission\ Control.app/Contents/MacOS/zmc
Switch the JVM installation for Mission Control (Optional)
On Windows, zmc.exe will use the default JVM installation configured in the registry. Zulu Mission Control must be launched from a full JDK to be able to detect local JVM instances automatically. If this is a JRE, you will see the warning below:
To change the JVM used by Mission Control, follow these steps:
- Open zmc.ini configuration file, located in the same directory as the zmc.exe
- Before the line
-vmargs, add two lines:
- On the first line, write
- On the second line, write the path to your JDK installation. (For example,
- On the first line, write
Locate the JVM running your application
- In the upper left pane of the Zulu Mission Control window, select the tab labelled JVM Browser.
- Select and expand the list item in the upper left for your the JVM instance running your application.
Start a Flight Recording, if necessary
- If the Flight Recorder displays "No Recordings", start one by right-clicking on the Flight Recorder line in the JVM Browser tab and selecting Start Flight Recording.
- Select either a fixed duration recording or a continuous recording, and either a Profiling configuration (fine-grained) or a Continuous configuration (lower overhead), then select Finish.
Dump the Flight Recording
- A Flight Recording should appear below the Flight Recorder line in the JVM Browser. Right-click on the line representing the Flight Recording and select Dump whole recording.
- A new tab will appear in the large pane on the right side of the Zulu Mission Control window. This pane represents the Flight Recording just dumped from the JVM running your application.
Examine the Flight Recording using Zulu Mission Control
- If not already activated, select the tab labelled Outline in the left pane of the Zulu Mission Control Window. This tab contains different views of the data collected in the Flight Recording.
We have also prepared a demonstration video narrated by Azul Systems Deputy CTO Simon Ritter. The video walks you through the configuration and setup of both Flight Recorder and Zulu Mission Control. The Flight Recorder discussion starts at 31:30.