WebLogic & JRockfit Flightrecording schedulingPublished on: Author: Michel Schildmeijer Category: Oracle
As part of an analysis during a longer period of time, I wanted to investigate on a deeper level and for a longer period, JRockit JVM level.
Besides using WLDF embedded FlightRecording, it is also possible to separately record using jrcmd commandline. Within JRockit JDK you have this recording option you can use to take recordings for a certain period or a certain amount of time. These options are available in JRockit Command line (jrcmd.sh — a shell script shipped within your JDK installation directory).
The script collects a recording for an hour but you can set your time as you wish. Now, let’s see how the script is built up.
- First, some parameters are set to identify which JVM you’d like to collect from.
- Next, we define a period of time of how long recording should run, the actual jrcmd command and name of the compressed file.
- We set some limits such as maxsize and compress to relieve your filesystem.
- Last part of the script will take care of some cleaning up. All recorded files older than N days are removed, as well as the tmp folders on your managed server volumes!
I used a remote JRockit MC Console, in which I can see the recordings. Usually you can download them if they have a green light, but because I cleaned the tmp dir of the managed server, I needed to copy the JFR’s manually and load them into my console.
I scheduled this script via crontab:
- 15 5-22 * * 1-5 nohup /u01/app/oracle/admin/general/wls/jrcmd.sh & >> /u01/app/oracle/admin/general/wls/jrcmdstart.log 2>&1 &
Using this approach we were able to get a day to day analysis on how applications were doing at JVM level, and we were able to solve our perfomanceproblem. The script was partly based on this article.
Publicatiedatum: 6 februari 2014