When I use the configuration like below in my application, it always gets some xxx.jfr.part file. How can I open the XXX.jfr.part file in Java Flight Recorder tool? How can I change the configuration to create a less .part file?
The configuration in my app:
-XX:+FlightRecorder
-XX:FlightRecorderOptions=defaultrecording=true,disk=true,maxsize=200m,maxage=3h,repository=/${MyApplicationPath}/log/jfr
The partial file which can not be opened:
|MyApplicationPath
__|log
____|jfr
_______|2018_11_14_05_33_06_17296
___________|2018_11_14_05_33_07_17296_0.jfr.part 2,727KB
___________|2018_11_14_05_33_07_17296_0.jfr 0KB
The .part file represents an unfinished file. The recommended way to extract data from the disk repository is to use the jcmd tool.
Oracle JDK 7/8 (which you seem to be using)
jcmd <pid> JFR.dump recording=0 filename=dump.jfr
It will finish the .part file and copy out the data in a safe manner. It's not possible to a read .part file, since important information on how to parse the file is located at the end.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With