Friday, October 07, 2016

Java Flight Recordings (JFR) for WLS managed servers

Starting Java Flight Recordings (JFR) for WLS managed servers



1) Identify the Process IDs for the managed servers you want to record.
ps -ef | grep WC_Spaces
ps -ef | grep UCM_server
2) You can start the recording with the following command:

/usr/java/jdk1.7.0_65bin/jcmd [PID] JFR.start duration=[DURATION]s filename[PATH_TO_FILE]

For example
/usr/java/jdk1.7.0_65bin/jcmd 1234 FR.start duration=14000s filename=/mnt1/jfr/OAMPOC/20161006/WC_Spaces1.jfr
The command will give you a confirmnation like:
Started recording 3. The result will be written to:/mnt1/jfr/OAMPOC/20161006/UCM_server1.jfr

Note the number of the recording (3) you will need this for the next step

3) The recording will stop automatically after the duration flag has been reached, if you need to stop it before that you can run the following command passing the recording number

/usr/java/jdk1.7.0_71/bin/jcmd 16439 JFR.stop recording=3

No comments: