Introduction
This article will walk you through how to capture the JFR recording of the Delegate.
Process
To Start the JFR recording:
-
currdumpname="jfrrecording.jfr"
-
cd jdk-11/bin/
-
pid=$(./jps | grep -E 'delegate.jar' | cut -d ' ' -f 1)
-
mkdir -p /opt/harness-delegate/jfrrecordings/
-
.
/jcmd $pid JFR.start name=jfrdump settings=profile filename=/opt/harness-delegate/jfrrecordings/$currdumpname
To Stop the JFR recording:
-
currdumpname="jfrrecording.jfr"
-
cd jdk-11/bin/
-
pid=$(./jps | grep -E 'delegate.jar' | cut -d ' ' -f 1)
-
./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