JFR(1)
π JFR(1) β the JDK Commands girlie has entered the chat π
okay so this is jfr, straight out of the JDK Commands lineup, and she is here to print and manipulate Flight Recorder files. no cap, that's the whole assignment. π
π NAME π
jfr β print and manipulate Flight Recorder files. that's it, that's the name, and she ate. β¨
πΈ SYNOPSIS πΈ
bestie, there are so many little subcommand vibes here. each one is its own main-character moment, so let's line them up exactly. π«Ά
To print the contents of a flight recording to standard out:
jfr print [options] file
To display aggregated event data on standard out:
jfr view [options] file
To configure a .jfc settings file:
jfr configure [options]
To print metadata information about flight recording events:
jfr metadata [file]
To view the summary statistics for a flight recording file:
jfr summary file
To remove events from a flight recording file:
jfr scrub [options] file
To assemble chunk files into a flight recording file:
jfr assemble repository file
To disassemble a flight recording file into chunk files:
jfr disassmble [options] file
π bestie, yes, the synopsis says disassmble β keep that spelling exactly character for character. do not "fix" it, do not narrate it, just preserve the iconique typo energy.
And now the little glossary bits that go with those synopsis lines:
optionsβ optional: specifies command-line options separated by spaces. the individual subcomponent sections have the descriptions of the available options, iykyk. πfileβ specifies the name of the target flight recording file (.jfr). the file in question, the moment, the.jfr. πrepositoryβ specifies the location of the chunk files which are to be assembled into a flight recording. it's giving "chunk files, but make it a home base." π
π DESCRIPTION π
okay so bestie, jfr is your little tool for vibing with flight recorder files (.jfr). its whole main character job is to filter, summarize and output flight recording files into something human readable. and that's not even all of it β it also does scrubbing, merging and splitting of recording files. versatile queen π
so flight recording files get created and saved as binary formatted files (not cute, not readable, lowkey scary). having a tool that pulls the contents out of a flight recording, manipulates said contents, and translates them into human readable format? that's literally how developers debug performance issues in Java applications. it's giving essential. periodt β¨
πΈ Subcommands πΈ
the jfr command has several subcommands:
printviewconfiguremetadatasummaryscrubassembledisassemble
π¨οΈ jfr print subcommand
use jfr print to print the contents of a flight recording file to standard out. iconic.
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 two options serve up machine-readable output that can be further parsed or processed by user created scripts π«Ά
use jfr --help print to see example usage of filters.
so to reduce the amount of data displayed, you can literally 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. and if a combination of a category filter and event filter is used, the selected events will be the union of the two filters β¨
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 little transformation, no cap π
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>. spoiler: all-views and all-events really do give you everything, hydrate accordingly π
βοΈ 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. super useful for troubleshooting and understanding the impact of event settings π₯
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. honestly? self-care.
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 it π
π§© jfr assemble subcommand
use jfr assemble to assemble chunk files into a recording file.
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. so yes, the unfinished ones get left on read π
βοΈ 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 around 15 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. zero-padding ate, fr fr π
π·οΈ 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
and that's the whole page bestie, you made it to the end π this little manual is living in JDK 27.0.1.0.3, dated 2026, and it's filed under JFR(1) β go debug something iconic πβ¨
π¦ where this page comes from
- arch rolling: jdk-openjdk 27.0.1.0.3.u1-1 Β· LicenseRef-Java
- arch rolling: jre-openjdk 27.0.1.0.3.u1-1 Β· LicenseRef-Java
- arch rolling: jre-openjdk-headless 27.0.1.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