Enabling Garbage Collection Monitoring on the WebLogic Server 9 (and above)
If the JVMGC test is to be executed for garbage collection (GC) monitoring, then the following additional steps need to be performed:
Edit the startWebLogic.cmd file (in Windows. In Unix, this will be startWebLogic.sh) in the <ORACLE_HOME>\user_projects\domains\base_domain\<YOUR_DOMAIN> directory (on WebLogic Server ver. 10.3).
- In the file, the 'echo' command to start the WebLogic server exists. Add -verbose:gc to the line next to this command, as indicated by Figure 1.
- Similarly, you will find an 'echo' command that will redirect the output from the WL window to a log file. Add the -verbose:gc entry to the line next to this command as well (as indicatd by Figure 1).
Then, save the file.
- Next, edit the startscript.xml file in the <ORACLE_HOME>\user_projects\domains\base_domain\init-info directory (on WebLogic ver. 10.3) to configure the location of the log file which should store the GC output. For this purpose, look for the entry <operand value="%WLS_REDIRECT_LOG%"> in the file. Once you locate this entry, you will find that another operand value parameter appears below it, but this parameter is left blank by default. Fill up this blank by specifying the full path to the log file in which the GC output is to be stored, as indicated by Figure 2.
- Finally, save the file.