Wednesday, June 27, 2012

Oracle Fusion Middleware 11G Default Log location change

In one of the project where I worked, during performance testing we have realized that IO calls was taking more time since we have implemented SAN storage, and our domain architecture was quite big 1 Admin was interacting around 20 Managed servers.
Due to performance issue with IO, we have introduced new Storage for which IO call response time was quite fast.
Now after that we have created a separate mount point for all the servers logs and filestore.
Due to above changes one requirement came to change the default log file location for all the logs files which get generated under domains.
Following is the list of logs files which is getting generated for Oracle Fusion Middleware 11G domain
 WebLogic Server Version:

Log file
Steps to change the default location for all these logs files
AdminConsole>>$DomainName>>Servers>>$ServerName>>Logging Tab Page>>HTTP tab page
EMConsole>>Farm_$DomainName>>WebLogicDomain>>$DomainName>>Click on $ServerName>>On right hand pane click on Weblogic server>>Logs>>LogConfiguration>>Log file tab page>>Select odi-handler>>Edit Configuration
1) AdminConsole>>Server>>Select Servername>>ServerStart tag page-
Add below entries under Arguments
"-Xloggc:=/u01/oracle/app/product/logs/AdminServer-gc.log -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -XX:+PrintTenuringDistribution -XX:+PrintHeapAtGC"

Preferred Method: As this effected for both when we start WLS server via Node Manager as well as shell script. 

2) Add the same above line in file under EXTRA_JAVA_OPTIONS e.g.
EXTRA_JAVA_OPTIONS="-Xloggc:/u01/oracle/app/product/logs/PROD1-SOA-domain/${SERVER_NAME}/logs/${SERVER_NAME}-gc.log -XX:+PrintGC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintTenuringDistribution -XX:+UseCompressedOops -XX:-PrintConcurrentLocks -verbose:gc"

For Jrockit JVM use the below gc parameters e.g. 

Preferred method to update below value in file as it works in both scenarios when we start WLS serer using Node Manager as well as scripts -

-XverboseTimeStamp -Xverbose:memory -Xgc:pausetime -Xverboselog:/u01/app/oracle/admin/aio_sit_domain/cluster/logs/WLS_OSB1/WLS_OSB1-gc_$(date +%Y%m%d_%H:%M:%S).log

In above syntax gc file name has postfix of timestamp. This is to avoid overwriting of gc.log again and again when we restart the WLS server.

For more details please refer below links -

Add below values inside file. 


Just use below code snipnet inside file to segregate JAVA_OPTION for different WLS Instance, just change the WLS serer name at bold places -  

if [ "`expr \"$SERVER_NAME\" : \".*WLS_BAM1.*\"`" != "0" ];then
echo "Setting up Custom JAVA_OPTION Parameters for WLS_BAM1"
JAVA_OPTIONS="${JAVA_OPTIONS} -Xms4096m -Xmx4096m -Dweblogic.Stdout=/u01/app/oracle/admin/user_domain/cluster/logs/WLS_BAM1/WLS_BAM1.out -Xverbose:memory -Xgc:pausetime -Xverboselog:/u01/app/oracle/admin/user_domain/cluster/logs/WLS_BAM1/WLS_BAM1-gc.log"
echo "WLS_BAM1 SERVER matching criteria not met, no Custom JAVA_OPTION will be set"

AdminConsole>>$DomainName>>Servers>>$ServerName>>Logging Tab Page>>General

AdminConsole>>$DomainName>>Logging Tab Page

Snap for diagnostic.log file

No comments:

Post a Comment