Java 11 - Enable Java Flight Recorder JVM option example

less than 1 minute read

1
2
3
4
5
6
-XX:StartFlightRecording=\
        disk=true, \
        dumponexit=true, \
        filename=recording.jfr, \
        maxsize=1024m,\
        maxage=1d

Checking running JFR with jcmd

1
% jcmd PID JFR.check name=1

Dump JFR now

1
%jcmd PID JFR.dump name=1 filename=dump.jfr