Visit Azul.com Support

JFR Command Line Options

Table of Contents
Need help?
Schedule a consultation with an Azul performance expert.
Contact Us

Based on your use-case, configure or start a JFR recording with one or more of the following options.

Applying Options at Startup of the Application

See Configure JFR File Recording at Startup of the Application for more information.

 
-XX:StartFlightRecording=delay=10s,duration=30m,...

Applying Options when Recording a Running Application

See Starting, Stopping and Reconfiguring a JFR File Recording for a Running Application for more information.

 
jcmd <PID> JFR.start delay=10s duration=30m ...

Available JFR Options

Option Description Default

settings=<path/to/settings/file>

Specifies the settings file to be used. In case of a custom configuration file, use the full path to the .jfc file. Otherwise, use one of the following presets:

  • default - Collects less data than profile but is more appropriate for runs where the JFR recording is continuously running side by side with the application.

  • profile - Collects more data than default but adds more performance overhead.

default

disk=<true, false>

Controls whether to create a temporary recording file under the path set in the repository option. Temporary recording means that a file is written to the system temporary directory during the time of the recording and is deleted afterwards. This recording file is populated gradually, unlike the file generated using the filename option, which is only populated once the recording finishes.

true

repository=<path/to/temp/recording>

Specifies the path for a temporary recording if the disk option is enabled.

/tmp/

filename=<filename.jfr>

Specifies the file name of the generated recording. You can add a path to the recording filename to change the file location. The recording file stays empty and only gets populated once the recording finishes.

hotspot-pid-%p-%t.jfr

duration=<time in specified unit>

Specifies the recording length. Used time units: ns/ms/s/m/h/d. For example, 1800s or 30m.

0, unlimited

delay=<time in specified unit>

Specifies the amount of time that the recorder must wait before starting to record. Used time units: ns/ms/s/m/h/d. For example, 1800s or 30m.

0

dumponexit=<true, false>

Controls whether to generate a recording file (dump a recording) if the JVM shuts down and the filename option has not been specified. The dumped recording filename is hotspot-pid-%p-%t.jfr

false

name=<identifier>

Specifies a name identifier for the recording. This is useful when working from jcmd and operating multiple recordings running at the same time.

1,2,3,4,…​

maxage=<time in specified unit>

Controls the maximum number of days the recording should be available on the disk, only when the disk parameter is set to true. Used time units: s/m/h/d.

0, unlimited

maxsize=<size in specified unit>

Controls the maximum size of disk data to keep for the recording, only when the disk parameter is set to true. Used size units: m or M (megabytes) / g or G (gigabytes).

0, unlimited

path-to-gc-roots=<true, false>

Controls whether to collect the path to the Garbage Collection (GC) roots at the end of a recording.

The path to the GC roots are useful when you want to debug memory leaks, but should only be enabled when you suspect there is such a memory leak in your application.

false