Configure Java VisualVM with Websphere Application Server
Hi everyone,
Since Version 1.5, Sun’s JDK includes a nice profiling tool called VisualVM, intended to be used by developers, sysadmins and any person that needs to troubleshoot and profile memory consumption in Java applications and servers. To run it, just execute the file jvisualvm located in $JAVA_HOME/bin. With VisualVM you can:
1.Monitor heap usage
2.Monitor CPU usage
3.Monitor Threads
4.Initiate garbage collections
5.Profile CPU and memory
6.And more…
To profile local applications is pretty easy, since you only need to start it and it’ll detect all Java-based applications and you’ll be able to see the Heap/PermGen usage, the number of threads used, the classes loaded by the class loader and other stuff.It can also be used to monitor IBM JVM’s. VisualVM is not able to connect to the IBM JVM locally. JMX must be used instead. To enable JMX monitoring on the IBM JVM follow the bellow procedure
Procedure:
From Websphere Application Server Side:
On the admin console Click on Servers->Server types->WebSphere application servers->server1->Process definition->Java Virtual Machine, add the following line into the field of Generic JVM Argument (note that the first system property is equal to nothing and no equal sign for the second system property):
-Djavax.management.builder.initial= -Dcom.sun.management.jmxremote
Add or uncomment the following three lines in fileWAS_HOME/java/jre/lib/management/management.properties
com.sun.management.jmxremote.port=1099
com.sun.management.jmxremote.authenticate=false
com.sun.management.jmxremote.ssl=false
com.sun.management.jmxremote.local.only=false
From Java VisualVM Side:
Go to the JAVA_HOME/bin and execute following command
jvisualvm.exe
Right click on the Local and clock on Add JMX connection
Insert the jmx port wich we have mentioned earlier in management.properties file i.e 1099
Double click on newly added jmx connection i.e localhost:1099 and we will get the monitoring console available for check
We can use the different tabs for monitoring different areas.
WebSphere is a set of Java-based tools from IBM that allow customers to create and manage sophisticated business Web sites. The central WebSphere tool is ... Layman Learning Courses
ReplyDeleteVisit: www.laymanlearning.com Support; Query? +91-741-626-7887 ... Online Corporate IT training services. OnlineTraining | Corporate Training | Layman Learning.