JFR(1)
π NAME π
hii bestie, welcome to JFR(1) from the JDK Commands manual β¨ This is the jfr command, and its whole vibe is: print and manipulate Flight Recorder files π
Think βmain character energy for your .jfr files,β no cap.
πΈ SYNOPSIS πΈ
okay so hereβs the group chat of ways to call it π every command line below is doing the most, and you need them exactly like this:
π print the contents to standard out
To print the contents of a flight recording to standard out:
jfr print [options] file
π¦ display aggregated event data
To display aggregated event data on standard out:
jfr view [options] file
π§ configure a settings file
To configure a .jfc settings file:
jfr configure [options]
β print metadata
To print metadata information about flight recording events:
jfr metadata [file]
π summary time
To view the summary statistics for a flight recording file:
jfr summary file
π₯ scrub those events
To remove events from a flight recording file:
jfr scrub [options] file
π assemble chunks
To assemble chunk files into a flight recording file:
jfr assemble repository file
π disassemble the recording
To disassemble a flight recording file into chunk files:
jfr disassmble [options] file
yes bestie, disassmble is spelled that way in the synopsis β keep it exactly as shown, iykyk π
π«Ά the little glossary bits
optionsβ Optional: it specifies command-line options separated by spaces. Wanna know what each one does? Check the individual subcomponent sections for descriptions of the available options πfileβ Specifies the name of the target flight recording file (.jfr) πrepositoryβ Specifies the location of the chunk files which are to be assembled into a flight recording π¦
β¨ DESCRIPTION β¨
Okay bestie, so the jfr command is your whole tool for messing with flight recorder files (.jfr). Its main-character job is to filter, summarize and output flight recording files into a format actual humans can read. But it's not just a printer β it also does scrubbing, merging and splitting of recording files. Versatile icon behavior π
Flight recording files get created and saved as binary formatted files. Having a tool that can pull the contents out of a flight recording, manipulate them, and translate them into human readable format? That's what helps developers debug performance issues with Java applications. Literally the whole point. π«Ά
π Subcommands π
The jfr command has several subcommands, bestie:
printviewconfiguremetadatasummaryscrubassembledisassemble
πΈ jfr print subcommand πΈ
Use jfr print to print the contents of a flight recording file to standard out.
The syntax is:
jfr print [--xml|--json|--exact] [--categories <filters>] [--events <filters>] [--stack-depth <depth>] <file>
where:
--xmlβ Print the recording in XML format.--jsonβ Print the recording in JSON format.--exactβ Pretty-print numbers and timestamps with full precision.--categories <filters>β Select events matching a category name. The filter is a comma-separated list of names, simple and/or qualified, and/or quoted glob patterns.--events <filters>β Select events matching an event name. The filter is a comma-separated list of names, simple and/or qualified, and/or quoted glob patterns.--stack-depth <depth>β Number of frames in stack traces, by default5.<file>β Location of the recording file (.jfr)
The default format for printing the contents of the flight recording file is human readable form unless either xml or json is specified. Those options give you machine-readable output that can be further parsed or processed by user created scripts. Slay for automation. π€
Use jfr --help print to see example usage of filters.
To reduce the amount of data displayed, it is possible to filter out events or categories of events. The filter operates on the symbolic name of an event, set by using the @Name annotation, or the category name, set by using the @Category annotation. If multiple filters are used, events from both filters will be included. If no filter is used, all the events will be printed. If a combination of a category filter and event filter is used, the selected events will be the union of the two filters. (Union, not intersection β write that down. π)
For example, to show all GC events and the CPULoad event, the following command could be used:
jfr print --categories GC --events CPULoad recording.jfr
Event values are formatted according to the content types that are being used. For example, a field with the jdk.jfr.Percentage annotation that has the value 0.52 is formatted as 52%. Cute, right? β¨
Stack traces are by default truncated to 5 frames, but the number can be increased/decreased using the --stack-depth command-line option.
π¦ jfr view subcommand π¦
Use jfr view to aggregate and display event data on standard out.
The syntax is:
jfr view [--verbose] [--width <integer>] [--truncate <mode>] [--cell-height <integer>] <view> <file>
where:
--verboseβ Displays the query that makes up the view.--width <integer>β The width of the view in characters. Default value depends on the view.--truncate <mode>β How to truncate content that exceeds space in a table cell. Mode can be'beginning'or'end'. Default value is'end'.--cell-height <integer>β Maximum number of rows in a table cell. Default value depends on the view.<view>β Name of the view or event type to display. Usejfr --help viewto see a list of available views.<file>β Location of the recording file (.jfr)
The <view> parameter can be an event type name. Use the jfr view types <file> to see a list. To display all views, use jfr view all-views <file>. To display all events, use jfr view all-events <file>. So many options, so little time π
π jfr configure subcommand π
Use jfr configure to configure a .jfc settings file.
The syntax is:
jfr configure [--interactive] [--verbose] [--input <files>] [--output <file>] [option=value]* [event-setting=value]*
--interactiveβ Interactive mode where the configuration is determined by a set of questions.--verboseβ Displays the modified settings.--input <files>β A comma-separated list of.jfcfiles from which the new configuration is based. If no file is specified, the default file in the JDK is used (default.jfc). If'none'is specified, the new configuration starts empty.--output <file>β The filename of the generated output file. If not specified, the filenamecustom.jfcwill be used.option=valueβ The option value to modify. To see available options, usejfr help configureevent-setting=valueβ The event setting value to modify. Use the form:<event-name>#<setting-name>=<value>To add a new event setting, prefix the event name with'+'.
The whitespace delimiter can be omitted for timespan values, i.e. 20ms. For more information about the settings syntax, see Javadoc of the jdk.jfr package.
π jfr metadata subcommand π
Use jfr metadata to display information about events, such as event names, categories and field layout within a flight recording file.
The syntax is:
jfr metadata [--categories <filter>] [--events <filter>] [<file>]
--categories <filter>β Select events matching a category name. The filter is a comma-separated list of names, simple and/or qualified, and/or quoted glob patterns.--events <filter>β Select events matching an event name. The filter is a comma-separated list of names, simple and/or qualified, and/or quoted glob patterns.<file>β Location of the recording file (.jfr)
If the <file> parameter is omitted, metadata from the JDK where the 'jfr' tool is located will be used. Convenient! π
π jfr summary subcommand π
Use jfr summary to print statistics for a recording. For example, a summary can illustrate the number of recorded events and how much disk space they used. This is useful for troubleshooting and understanding the impact of event settings. iykyk π
The syntax is:
jfr summary <file>
where:
<file>β Location of the flight recording file (.jfr)
π§ jfr scrub subcommand π§
Use jfr scrub to remove sensitive contents from a file or to reduce its size. Important! Sensitive stuff? Gone. π
The syntax is:
jfr scrub [--include-events <filter>] [--exclude-events <filter>] [--include-categories <filter>] [--exclude-categories <filter>] [--include-threads <filter>] [--exclude-threads <filter>] <input-file> [<output-file>]
--include-events <filter>β Select events matching an event name.--exclude-events <filter>β Exclude events matching an event name.--include-categories <filter>β Select events matching a category name.--exclude-categories <filter>β Exclude events matching a category name.--include-threads <filter>β Select events matching a thread name.--exclude-threads <filter>β Exclude events matching a thread name.<input-file>β The input file to read events from.<output-file>β The output file to write filter events to. If no file is specified, it will be written to the same path as the input file, but with"-scrubbed"appended to the filename.
The filter is a comma-separated list of names, simple and/or qualified, and/or quoted glob patterns. If multiple filters are used, they are applied in the specified order. Order matters, bestie β don't skip that. π«Ά
π jfr assemble subcommand π
Use jfr assemble to assemble chunk files into a recording file. Like getting the girlies back together. β¨
The syntax is:
jfr assemble <repository> <file>
where:
<repository>β Directory where the repository containing chunk files is located.<file>β Location of the flight recording file (.jfr).
Flight recording information is written in chunks. A chunk contains all of the information necessary for parsing. A chunk typically contains events useful for troubleshooting. If a JVM should crash, these chunks can be recovered and used to create a flight recording file using this jfr assemble command. These chunk files are concatenated in chronological order and chunk files that are not finished (.part) are excluded. Crash recovery era π
β jfr disassemble subcommand β
Use jfr disassemble to decompose a flight recording file into its chunk file pieces.
The syntax is:
jfr disassemble [--max-chunks <chunks>] [--output <directory>] <file>
where:
--output <directory>β The location to write the disassembled file, by default the current directory--max-chunks <chunks>β Maximum number of chunks per file, by default5. The chunk size varies, but is typically around15 MB.--max-size <size>β Maximum number of bytes per file.<file>β Location of the flight recording file (.jfr)
This function can be useful for repairing a broken file by removing the faulty chunk. It can also be used to reduce the size of a file that is too large to transfer. The resulting chunk files are named myfile_1.jfr, myfile_2.jfr, etc. If needed, the resulting file names will be padded with zeros to preserve chronological order. For example, the chunk file name is myfile_001.jfr if the recording consists of more than 100 chunks. The way it pads for the aesthetic and for the chronology ππ«Ά
π jfr version and help subcommands π
Use jfr --version or jfr version to view the version string information for this jfr command.
To get help on any of the jfr subcommands, use:
jfr <--help|help> [subcommand]
where [subcommand] is any of:
printviewconfiguremetadatasummaryscrubassembledisassemble
Okay that's the whole page, bestie β you're officially fluent in jfr π
β¨ This iconic piece of documentation comes from JDK 25.0.5.0.3 and is dated 2026 (yes, the future, she's ahead of her time π¦). Go debug those performance issues, periodt. πΈ
π¦ where this page comes from
- arch rolling: jdk25-openjdk 25.0.5.0.3.u1-1 Β· LicenseRef-Java
- arch rolling: jre25-openjdk 25.0.5.0.3.u1-1 Β· LicenseRef-Java
- arch rolling: jre25-openjdk-headless 25.0.5.0.3.u1-1 Β· LicenseRef-Java
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms