Java VisualVM is a tool that provides a visual interface for viewing detailed information about Java technology-based applications (Java applications) while they are running on a Java Virtual Machine (JVM).
ava VisualVM can be used by Java application developers/administrator to troubleshoot applications and to monitor and improve the applications' performance. Java VisualVM can allow developers to generate and analyse heap dumps, track down memory leaks, browse the platform's MBeans and perform operations on those MBeans, perform and monitor garbage collection, and perform lightweight memory and CPU profiling.
Step 1: Navigate to $JBOSS_Home/bin and edit standalone.conf.bat
Step 2: Add below configuration on standalone.conf.bat file.
*****************************************
set "JAVA_OPTS=%JAVA_OPTS% -Djboss.platform.mbeanserver"
set "JAVA_OPTS=%JAVA_OPTS% -Xbootclasspath/p:D:\JBOSS\jboss-as-7.1.1.Final\modules\org\jboss\logmanager\main\jboss-logmanager-1.2.2.GA.jar -Xbootclasspath/p:D:\JBOSS\jboss-as-7.1.1.Final\modules\org\jboss\logmanager\log4j\main\jboss-logmanager-log4j-1.0.0.GA.jar -Xbootclasspath/p:D:\JBOSS\jboss-as-7.1.1.Final\modules\org\apache\log4j\main\log4j-1.2.16.jar"
set "JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
set "JAVA_OPTS=%JAVA_OPTS% -Djboss.modules.system.pkgs=org.jboss.byteman,org.jboss.logmanager"
set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"
set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.port=9002"
set "JAVA_OPTS=%JAVA_OPTS% -Djava.rmi.server.hostname=192.168.XXX.XXX"
****************************************
Where,
You can change port numbers & host name IP.
ava VisualVM can be used by Java application developers/administrator to troubleshoot applications and to monitor and improve the applications' performance. Java VisualVM can allow developers to generate and analyse heap dumps, track down memory leaks, browse the platform's MBeans and perform operations on those MBeans, perform and monitor garbage collection, and perform lightweight memory and CPU profiling.
Step 1: Navigate to $JBOSS_Home/bin and edit standalone.conf.bat
Step 2: Add below configuration on standalone.conf.bat file.
*****************************************
set "JAVA_OPTS=%JAVA_OPTS% -Djboss.platform.mbeanserver"
set "JAVA_OPTS=%JAVA_OPTS% -Xbootclasspath/p:D:\JBOSS\jboss-as-7.1.1.Final\modules\org\jboss\logmanager\main\jboss-logmanager-1.2.2.GA.jar -Xbootclasspath/p:D:\JBOSS\jboss-as-7.1.1.Final\modules\org\jboss\logmanager\log4j\main\jboss-logmanager-log4j-1.0.0.GA.jar -Xbootclasspath/p:D:\JBOSS\jboss-as-7.1.1.Final\modules\org\apache\log4j\main\log4j-1.2.16.jar"
set "JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
set "JAVA_OPTS=%JAVA_OPTS% -Djboss.modules.system.pkgs=org.jboss.byteman,org.jboss.logmanager"
set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"
set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.port=9002"
set "JAVA_OPTS=%JAVA_OPTS% -Djava.rmi.server.hostname=192.168.XXX.XXX"
****************************************
Where,
You can change port numbers & host name IP.
screenshot:
Step 3: Navigate to $JAVA_HOME/bin of remote machine & open jvisualvm application as an administrator.
Step 4: Right Click on Remote & Add Remote Host (IP).
Step 5: Add JMX connection using port number (9002) used on standalone.conf.bat, OK
Step 6: Open the connection & click on Monitor.
Thanks :-)
No comments:
Post a Comment