Turning On Verbose Garbage Collection and Redirecting Output
This section describes how to turn on verbose garbage collection and redirect output to a log file for diagnostic purposes:
1. Turn on verbose garbage collection output for your Java VM when you start WebLogic Server, as shown in the example in the following step.
2. Redirect both the standard error and standard output to a log file.
This places thread dump information in the proper context with WebLogic Server informational and error messages, and provides a more useful log for diagnostic purposes.
For example:
% java -ms64m -mx64m -verbosegc -classpath $CLASSPATH
-Dweblogic.domain=mydomain -Dweblogic.Name=clusterServer1
-Djava.security.policy==/bea/weblogic6x/lib/weblogic.policy
-Dweblogic.management.server=192.168.0.101:7001 -Dweblogic.management.username=system
-Dweblogic.management.password=systemPassword weblogic.Server >> logfile.txt
On HPUX, use the following option to redirect stderr stdout to a single file:
-Xverbosegc:file=/tmp/gc$$.out
where $$ maps to the PID of the java process. Because the output includes timestamps for when garbage collection ran, you can infer how often garbage collection occurs.
On Solaris, use the following command:
weblogic.Server > server.out 2>&
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment