java-jvisualvm远程监控tomcat
一、修改要访问的远程主机(Linux)相关文件,本文档只介绍了java-jvisualvm的JMX方式:
1.打开$CATALINA_HOME/bin/startup.sh, 找到倒数第二行(也就是exec "$PRGDIR"/"$EXECUTABLE" start "$@"一行上边)加上如下内容:
export CATALINA_OPTS="$CATALINA_OPTS-Dcom.sun.management.jmxremote -Djava.rmi.server.hostname=192.168.*.* -Dcom.sun.management.jmxremote.port=7003 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=true -Dcom.sun.management.jmxremote.password.file=/opt/apache-tomcat-6.0.18/conf/jmxremote.password -Dcom.sun.management.jmxremote.access.file=/opt/apache-tomcat-6.0.18/conf/jmxremote.access"
2.备注:
-Dcom.sun.management.jmxremote 启用JMX远程监控
-Djava.rmi.server.hostname=192.168.*.* 连接的服务器地址
-Dcom.sun.management.jmxremote.port=7003 jmx连接端口
-Dcom.sun.management.jmxremote.ssl=false 是否ssl加密
-Dcom.sun.management.jmxremote.authenticate=true 远程连接需要密码认证(如为false后面的可省略);
-Dcom.sun.management.jmxremote.password.file=/opt/apache-tomcat-6.0.18/conf/jmxremote.password 指定连接的用户名和密码配置文件
-Dcom.sun.management.jmxremote.access.file=/opt/apache-tomcat-6.0.18/conf/jmxremote.access 指定连接的用户所拥有权限的配置文件
3.其中jmxremote.password文件:
monitorRole roor123
controlRole root123
4.jmxremote.access文件:
monitorRole readonly
controlRole readwrite
5.重启Tomcat服务。
二、在本地(Windows)创建jvisualvm--JMX连接
1.打开本地安装JDK_HOME/bin目录:C:\Java\jdk1.7.0_80\bin
2.双击:jvisualvm.exe

3.右键添加远程主机:

4.新建JMX连接

5.查看:

java-jvisualvm远程监控tomcat的更多相关文章
- 使用jvisualvm远程监控tomcat(阿里云ECS)
写在前面: 使用jvisualvm远程监控tomcat(阿里云ECS),连接是报错:service:jmx:rmi:////jndi/rmi:IP:端口// 连接到 IP:端口,网上找了很多资料, ...
- jvisualvm远程监控Tomcat
网上已经有很多这方面的资料,但有些很杂乱,这里做了整理总结. 一.Java VisualVM 概述 对于使用命令行远程监控jvm 太麻烦 . 在jdk1.6 中 Oracle 提供了一个新的可视化的. ...
- Java jvisualvm 远程监控tomcatt
第一步 在远程tomcat 的bin目录下的start.sh 文件中添加一些内容(添加在exec "$PRGDIR"/"$EXECUTABLE" start & ...
- 用JMX远程监控Tomcat
要通过JMX远程监控Tomcat,首先需要进行Tomcat的JMX远程配置. 注意:此配置添加在catalina.bat文件开头的注释行(rem)后面即可. 不需鉴权的配置: 先修改Tomcat的启动 ...
- 使用JMX工具远程监控tomcat配置
使用JMX工具远程监控tomcat,在tomcat启动时添加配置参数: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.po ...
- Java虚拟机二:使用jvisualvm工具远程监控tomcat内存
jdk中自带了很多工具可以用于性能分析,位于jdk的bin目录下,jvisualvm工具可以以图形化的方式更加直观的监控本地以及远程的java进程的内存占用,线程状态等信息. 一.配置tomcat 在 ...
- 【jvisualvm远程监控配置】
第一步:首先通过hostname -i 和ifconfig命令,查看一下IP地址是否一致 如果不一致,修改hosts的IP地址:vi /etc/hosts 把ip地址和ifconfig的地址修 ...
- 远程监控tomcat内存使用
边界远程Tomcat服务器的Tomcat配置文件,如下: vi /etc/init.d/tomcatd8_test export JAVA_OPTS="-Xms1024m -Xmx4056m ...
- JVisualVM远程监控
本文主要转自:http://blog.iamzsx.me/show.html?id=394002 http://www.wl566.com/wz/64022.html 1. 通过JMX方式监控远程li ...
随机推荐
- 推荐一些C#相关的网站、资源和书籍 (转载自http://www.cnblogs.com/jiangxiaofan/p/3808316.html)
推荐一些C#相关的网站.资源和书籍 (转载自http://blog.csdn.net/chinacsharper/article/details/17514923) 一.网站 1.http://m ...
- 《.NET 编程结构》专题汇总
<.NET 编程结构>专题汇总 前言 掌握一门技术,首要的是掌握其基础. 笔者从事.NET相关开发多年,也非常喜欢.NET,多年来也积累了很多相关的资料,在此将一些基础性的 ...
- MacOSX高分屏图片打包工具tiffutil的简单使用
You can use the man command tiffutil with the option -cathidpicheck. The command lets you manipulate ...
- Java7新特性
① 新增了switch对字符串的支持,也就是说可以在switch之后直接使用字符串来进行判断,语法基本与Java7之前支持的语法一样. ② 对数值字面量的增强支持,首先是可以在源代码中直接使用二进制数 ...
- 【stanford C++】字符串(String)与流(Stream)
字符串(String)与流(Stream) 一.C++中字符串(String) 字符串(String):就是(可能是空的)字符序列. C++中的字符串在概念上和Java中的字符串类似. C++字符串用 ...
- 【Coursera - machine learning】 Linear regression with one variable-quiz
Question 1 Consider the problem of predicting how well a student does in her second year of college/ ...
- [ios2]发布时去除NSLog打印
#if DEBUG #warning NSLogs will be shown #else #define NSLog(...) {} #endif
- Linux中的info指令
Info 是什么?info是一种文档格式,也是阅读此格式文档的阅读器:我们常用它来查看Linux命令的info文档.它以主题的形式把几个命令组织在一起,以便于我们阅读:在主题内以node(节点)的形式 ...
- [Angular Directive] Implement Structural Directive Data Binding with Context in Angular
Just like in *ngFor, you're able to pass in data into your own structural directives. This is done b ...
- USB调试不能弹出授权窗口 unauthorized 的解决办法
今天把 AndroidStudio 1.5 给卸载了,重新安装 2.1版本,据说速度快了很多,结果手机一直没法授权调试,授权USB调试信任PC设备的窗口始终没看到,网上找了好多方法,什么驱动.重启.各 ...