JConsole 远程监控tomcat for Linux

JConsole远程监控tomcat

1.配置tomcat 远程

编辑tomcat/bin/catalina.sh
vi tomcat/bin catalina.sh

搜索—–Execute The Requested Command ———————–
-----Execute The Requested Command -----------------------上一行加入
JAVA_OPTS="-Dcom.sun.management.jmxremote.port=空端口号-Djava.rmi.server.hostname=服务器地址
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false")

JConsole 远程监控tomcat for Linux

2.编辑jdk下的jmxremote.access和jmxremote.password


cd /usr/java/jdk1.6.0_18/jre/lib/management
mv jmxremote.password.template jmxremote.password
chmod 600 jmxremote.access jmxremote.password
vi jmxremote.password

jmxremote.access 一般保持原始内容不变即可。
对于jmxremote.password,将 其中的:
monitorRole 用户名
controlRole 口令

井号注释取消掉。其中monitorRole为只拥有只读权限的角色,controlRole有更高权限:读写等等。

3.重新启动tomcat#**

4.使用windows客户机上的jconsole连接服务器端 进行监控。

JConsole 远程监控tomcat for Linux
JConsole 远程监控tomcat for Linux
点击“连接”,进入监控页面:
JConsole 远程监控tomcat for Linux