JVM visual monitoring tool jconsole and configuration jvisualvm

Jdk that comes with using jconsole, jvisualvm plug, remote monitoring jvm linux server in case of tomcat

(Jconsole, jvisualvm plug-in to view the heap memory changes, the thread state, CPU usage, analyze thread deadlock can monitor local and remote server JVM, local monitoring without the need for configuration, the following is to configure the remote monitoring of the actual operation of the author step)

step:

1 catalina.sh file, modify the linux server tomcat directory, configure remote port services

catalina.sh edit files in the bin directory of tomcat, the "# ----- Execute The Requested Command -------------" insert

CATALINA_OPTS="$CATALINA_OPTS

-Dcom.sun.management.jmxremote

-Dcom.sun.management.jmxremote.port=9999

-Dcom.sun.management.jmxremote.ssl=false

-Dcom.sun.management.jmxremote.authenticate=true"

Wherein the port = 9999, self-setting, note that adding a port to an unused

Modifications are complete, save the file

 

2, modify linux jdk directory server configuration file

/Java/jre1.8.0_77/lib/management into the catalog, view the file.

2.1 modify jmxremote.access file, the last two lines of the display file comments] [monitorRole and controlRole cancellation, which monitorRole to only have read-only access role, controlRole higher authority: reading and writing. After editing, save.

 

jmxremote.password file does not exist in the directory under 2.2 by default, we can copy the files out of a jmxremote.password.template can then rename and modify jmxremote.password file. The last two lines of the same documents show comments and controlRole] [monitorRole cancellation. Then save.

 

2.3 pairs jmxremote.access and jmxremote.password file authorization

 

3, modify / etc / hosts file, change the cost 127.0.0.1 local IP, such as 192.168.101.100

 

4, at the connection start jconsole.exe local directory jdk

Enter the address and port, user name and password, which the port for remote service port catalina.sh file configuration; user name and for the account information jmxremote.password file

 

 Connection can view the monitoring information

 

5, may be used jvisualvm.exe card connector Similarly, monitoring

(Note: References: "full-stack performance test practice book JMeter combat" 9.8 JVM monitoring)

 

Guess you like

Origin www.cnblogs.com/simple1025/p/11104272.html