Visit Support

Recording a Running Application

Table of Contents
Need help?
Schedule a consultation with an Azul performance expert.
Contact Us

Thanks to JFR and jcmd, you can make a recording to file from a running application if you have terminal access to the environment where the application is running.

Starting a Recording

Start a recording for a running application on the same host and userid as the Java process under analysis, by running the following command:

$ jcmd JVMID JFR.start filename=rec.jfr

Where JVMID is either the process ID or the classname assigned with the java process as shown when running jcmd without parameters.

Stopping a Recording

Use the JFR.stop command to stop a JFR recording, either by its name or ID. If no name or ID is specified, the first recording which is found, is stopped.

$ jcmd JVMID JFR.stop name=1

Modifying a Recording

Change the settings of a running JFR recording with the JFR.config command:

jcmd <PID> JFR.config filename=new_file.jfr


See JFR Command Line Options for a complete overview of the available options.