Java - JFR start/dump and health reporting agent
From JDK 11, the following command will start recording JFR
1
$ jcmd [pid] JFR.start duration=60s filename=myrecording.jfr
Dump recording
1
$ jcmd JFR.dump
Details can be found from below.
https://docs.oracle.com/javacomponents/jmc-5-4/jfr-runtime-guide/run.htm#JFRUH177
There is a nice agent which can report the health of Java application at realtime but it requires Java 14.