Skip Headers
Previous
Previous
 
Next
Next

How to Create a Black Box Recording

Like its aeronautic namesake, a black box recording provides an account of events leading up to a “catastrophic” failure of a system or application. Whenever a Java application running on HotSpot is started with the JFR enabled, data is constantly collected in the JFR or its buffers. In the event of system failure, the content of this recording can be dumped to a file and used for post-mortem analysis of what went wrong. Examples of such events include a JVM crash, unexpected application termination, or a power failure. The JFR GUI provides a mechanism for recovering and inspecting this data.

To create a black box recording:

  1. Start the JVM wih the following JVM flags: -XX:+UnlockCommercialFeatures, -XX:+FlightRecorder, -XX:FlightRecorderOptions=defaultrecording=true.

  2. In the Context Menu for the JVM, select Dump Default Recording.

    The Dump Recording dialog box appears.

  3. Use Browse if necessary to locate the filepath or if you want to overwrite an existing file.

  4. Select the duration of the recording by clicking the appropriate radio button, as described in Table: Selecting the Duration of Black Box Data.

    Selecting the Duration of Black Box Data

    To dump... Do this...

    The entire recording

    Select Whole recording.

    The final nn minutes of the recording

    1. Select Last part of recording.

    2. Using the slider, set the amount of time (minutes and seconds) before the end recording ended for which you want data

    A selected time range

    1. Select Interval of recording.

    2. In Start Time, select the start time of the range of existing data you want to dump.

    3. In End Time, select the end time of the range of existing data you want to dump.


  5. Click OK.

    The recording will be dumped to the specified file. You can then open this file in the JFR and inspect its data there.