当前位置:网站首页>JVM调试工具-jvisualvm
JVM调试工具-jvisualvm
2022-06-24 06:39:00 【Angryshark_128】
jvisualvm
配置安装
- 上传tomcat至服务器并解压
> tar -xf apache-tomcat-9.0.14.tar.gz
> cd apache-tomcat-9.0.14/bin
- 修改catalina.sh,添加如下语句:
JAVA_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=10086 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname=*.*.*.* -Dcom.sun.management.jmxremote.rmi.port=10086"
# 参数说明
-Dcom.sun.management.jmxremote :是否支持远程JMX访问,默认true;
-Dcom.sun.management.jmxremote.port :是JMX远程监控端口号,需要在防火墙开放该端口;
-Dcom.sun.management.jmxremote.ssl=false :表示是否对连接开启SSL加密,默认开启;
-Dcom.sun.management.jmxremote.authenticate=false:是否需要开启用户认证,默认开启,如果开启需要额外配置授权文件;
-Djava.rmi.server.hostname=*.*.*.* :远程服务器的主机名;
-Dcom.sun.management.jmxremote.rmi.port=10086 :RMI端口号,JMX在远程连接时,会随机开启一个RMI端口作为连接的数据端口,可以和JMX端口号相同。
- 启动tomcat
> ./startup.sh
- 配置远程jstatd
> cd $JAVA_HOME/bin
> touch jstatd.all.policy
添加如下内容:
grant codebase "file:${java.home}/../lib/tools.jar" {
permission java.security.AllPermission;
};
> chmod +x jstatd.all.policy
> jstatd -J-Djava.rmi.server.hostname=*.*.*.* -J-Djava.security.policy=$JAVA_HOME/bin/jstatd.all.policy -p 1100
- 打开本地JVM调试器
> jvisualvm

- 添加远程连接进行调试





- 添加jstatd连接

边栏推荐
- Leetcode: Sword finger offer 26: judge whether T1 contains all topologies of T2
- Nine unique skills of Huawei cloud low latency Technology
- 记录--关于JSP前台传参数到后台出现乱码的问题
- How do I turn off win10 automatic update? What are the good ways?
- puzzle(019.1)Hook、Gear
- 【JUC系列】Executor框架之CompletionFuture
- On BOM and DOM (6): bit value calculation of DOM objects and event objects, such as offsetx/top and clearx
- 文件系统笔记
- leetcode:剑指 Offer 26:判断t1中是否含有t2的全部拓扑结构
- 应用配置管理,基础原理分析
猜你喜欢
![Jumping game ii[greedy practice]](/img/e4/f59bb1f5137495ea357462100e2b38.png)
Jumping game ii[greedy practice]

记录--关于virtual studio2017添加报表控件的方法--Reportview控件

华为云低时延技术的九大绝招

Leetcode: Sword finger offer 26: judge whether T1 contains all topologies of T2

File system notes

Internet cafe management system and database

Arduino融资3200万美元,进军企业市场

35 year old crisis? It has become a synonym for programmers
![[Yugong series] June 2022 asp Basic introduction and use of cellreport reporting tool under net core](/img/18/1576cb7bdae5740828d1db5b283aee.png)
[Yugong series] June 2022 asp Basic introduction and use of cellreport reporting tool under net core

.NET7之MiniAPI(特别篇) :Preview5优化了JWT验证(上)
随机推荐
Game website making tutorial and correct view of games
Database stored procedure begin end
MAUI使用Masa blazor组件库
35岁危机?内卷成程序员代名词了
Free and easy-to-use screen recording and video cutting tool sharing
You have a chance, here is a stage
GPU frequency of zhanrui chip
The cloud monitoring system hertzbeat V1.1.0 is released, and a command starts the monitoring journey!
记录--关于JSP前台传参数到后台出现乱码的问题
Go operation SQLite code error
Overview of new features in mongodb5.0
学生管理系统页面跳转及数据库连接
About Stacked Generalization
智能视觉组A4纸识别样例
setInterval里面的函数不能有括号
程序员使用个性壁纸
About Stacked Generalization
线程安全与实现方法
puzzle(019.1)Hook、Gear
【问题解决】虚拟机配置静态ip