Linux under Visualvmware JVM monitoring configuration

Source: Internet
Author: User

1. Installing OPENJDK

Centos:yum Install JAVA-1.8.0-OPENJDK Java-1.8.0-openjdk-devel

2.

# cd/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.31-1.b13.el6_6.x86_64/jre/lib/management/# CP Jmxremote.password.template jmxremote.password# chmod 644 jmxremote.password# VI jmxremote.passwordmonitorrole  QED      Controlrole   

3.JSTATD Start with daemon process

# jstatd-j-djava.rmi.server.hostname=172.28.37.200 &[1] 8601# Could not create remote objectaccess denied ("Java.uti L.propertypermission "" Java.rmi.server.ignoreSubClasses "" write ") java.security.AccessControlException:access Denied ("Java.util.PropertyPermission" "java.rmi.server.ignoreSubClasses" "write") at Java.security.AccessControlContext.checkPermission (accesscontrolcontext.java:472) at Java.security.AccessController.checkPermission (accesscontroller.java:884) at Java.lang.SecurityManager.checkPermission (securitymanager.java:549) at Java.lang.System.setProperty (System.java : 792) at Sun.tools.jstatd.Jstatd.main (jstatd.java:139)

Solve:

#cd/home/jdk-1.8/bin#vim jstatd.all.policy    Grant codebase "file:${java.home}/. /lib/tools.jar "{permission java.security.AllPermission;};
#jstatd-j-djava.security.policy=jstatd.all.policy-j-djava.rmi.server.hostname=172.28.37.200 &
[1] 10008

4. Under Windows Java_home/bin, open the Jvisualvm.exe

, showing that the CPU is not supported by the JVM and needs to establish a JVM link

Under Tomcat, modify and add JVM parameters

# cd/root/apache-tomcat-8.0.17/bin# VI catalina.sh   #找到JAVA_OPTS, added below, added location not required
java_opts= "$JAVA _opts-dcom.sun.management.jmxremote         -dcom.sun.management.jmxremote.port=9999         - Dcom.sun.management.jmxremote.authenticate=false         -dcom.sun.management.jmxremote.ssl=false         - djava.rmi.server.hostname=172.28.37.200 "#/startup.sh # NETSTAT-ANTP |grep 9999    #查看端口是否监听

Dubbo Service, modifying or adding JVM parameters

# Vim Service.sh
java_opts= "$JAVA _opts-dcom.sun.management.jmxremote         -dcom.sun.management.jmxremote.port=9999         - Dcom.sun.management.jmxremote.authenticate=false         -dcom.sun.management.jmxremote.ssl=false         - Djava.rmi.server.hostname=172.28.37.200 "

View Port monitoring after reboot

# NETSTAT-ANTP |grep 9999    #查看端口是否监听

CPU monitoring has occurred after reboot

Linux under Visualvmware JVM monitoring configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.