How to Capture JFR recording of the Delegate

Introduction
This article will walk you through how to capture the JFR recording of the Delegate.

Process

To Start the JFR recording:

  1. currdumpname="jfrrecording.jfr"

  2. cd jdk-11/bin/

  3. pid=$(./jps | grep -E 'delegate.jar' | cut -d ' ' -f 1)

  4. mkdir -p /opt/harness-delegate/jfrrecordings/

  5. ./jcmd $pid JFR.start name=jfrdump settings=profile filename=/opt/harness-delegate/jfrrecordings/$currdumpname

To Stop the JFR recording:

  1. currdumpname="jfrrecording.jfr"

  2. cd jdk-11/bin/

  3. pid=$(./jps | grep -E 'delegate.jar' | cut -d ' ' -f 1)

  4. ./jcmd $pid JFR.stop name=jfrdump filename=/opt/harness-delegate/jfrrecordings/$currdumpname

You can get this JFR dump out of the delegate using kubectl cp