Followers

Sunday, October 7, 2012

JAVA_OPTION parameters in weblogic

For Sun JDK:
- To get verbose GC loggging:
-verbose:gc
-Xloggc:file
-XX:-PrintGC
-XX:-PrintGCDetails
-XX:-PrintGCTimeStamps
- To get heap dump on out of memory:
-XX:HeapDumpPath=./java_pid<pid>.hprof
-XX:-HeapDumpOnOutOfMemoryError
For JRockit JDK:
- To get verbose GC loggging:
-Xverbose:gc,memdbg,compaction,gcpause 
-Xverboselog:file
-XverboseTimeStamp
- To get heap dump on out of memory: There is no java parameter to add in case of JRockit. We need to take JRA/flight recording with help of jrmc tool or jrcmd commands
If you add these java parameters in JAVA_OPTIONS in setDomainEnv.sh or startup scripts then it will get applied to all servers and gc logging or heap dump information for all servers may get written in same log file. In order to avoid this follow either of below:
- Command line startup: In this case create new startup managed server scripts for one or two servers and add these parameters with different file names foe GC and heap dump logging. This will generate different files which can be analysed separately.
- Remote startup: In this case add above java parameters separately in startup arguments for individual servers.