jvisualvm远程监控Linux下的tomcat

来源:互联网 发布:mac传照片给iphone 编辑:程序博客网 时间:2024/06/13 03:25

1、linux下检查host是否是127.0.0.1 , 执行命令 hostname -i 如果是127.0.0.1 ,在etc/hosts 文件中将127.0.0.1改为主机IP(此处为192.168.193.129);



2、linux下在catalina.sh文件中添加如下:

 CATALINA_OPTS="-Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname=192.168.193.129"



3、linux下关闭防火墙;chkconfig iptables off,重启防火墙命令:service iptables restart;

 

4、windows下打开java安装目录bin目录下的jvisualvm.exe(C:\Program Files\Java\jdk1.7.0_45\bin);

 

5、在远程上右键,添加远程主机;



 

6、在添加的远程主机上右键,添加Jmx(此处不需要密码,点击确定即可);


 

7、双击连接查看Jvm运行情况


 


转载:http://blog.csdn.net/keketrtr/article/details/52292089

原创粉丝点击