I've been profiling my QA WebLogic application because it's been really misbehaving the last two weeks. Sun's free swing app, jconsole, gives a bunch of insight into performance metrics such as memory, garbage collection and object counts.
- Enable your JVM to use JConsole
The jconsole app is enabled via command line parameters that activate at startup. On weblogic you modify the file setDomainEnv.sh in the bin directory of your WL 'domain'. Add the following (Solaris/Unix):
# Allow JConsole to view this JVM
JC_JMX_ENAB="-Dcom.sun.management.jmxremote=true"
# Allow remote access to JConsole at this port
JC_JMX_PORT="-Dcom.sun.management.jmxremote.port=5097"
# Don't require login
JC_JMX_AUTH="-Dcom.sun.management.jmxremote.authenticate=false"
# Don't require SSL
JC_JMX_SSL="-Dcom.sun.management.jmxremote.ssl=false "
JAVA_OPTIONS="${JAVA_OPTIONS} ${JC_JMX_ENAB} ${JC_JMX_PORT} ${JC_JMX_AUTH} ${JC_JMX_SSL}"
export JAVA_OPTIONS - Restart the WL Server instance or JVM
- Start a command line JConsole session on your desktop
Do this by executing jconsole.exe from the bin directory of your JSDK installation. - Connect to your remote server at the specified JMX port
Select the 'Remote Process' radio button and enter the host server name and using the port (5097 in this example) in the form [hostname]:[port].
REFERENCES
- http://www.javapassion.com/handsonlabs/jconsole/index.html#Configure_a_simple_app
- http://java.sun.com/developer/technicalArticles/J2SE/jconsole.html
- http://java.sun.com/javase/6/docs/technotes/tools/share/jconsole.html
SEE ALSO
No comments:
Post a Comment