zoukankan      html  css  js  c++  java
  • jvm本地调试jdk1.8本地调试

    1、首先要查看jvm信息,在java服务启动时是需要指定参数的,我这个是springboot服务jar包启动方式;命令如下:

    nohup java -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=9010 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=172.xxx -Dcom.sun.management.jmxremote.rmi.port=9011 -jar tttest.jar &

    2、使用jdk自带工具 VisualVM ,方法打开cmd命令窗口,输入jvisualvm.exe

    3、输入上面命令后自动打开窗口

    如果时本地运行的java服务,直接打开本地的那个虚拟机即可,如果时远程的则需要使用远程工具,右键添加主机,选择格式是:ip:port   。然后再右键刚才添加的主机,选择添加jmx连接。

    如果一切顺利就打开了查看页面。

    4、对于上面的命令参数有个说明

    配置功能备注
    -Dcom.sun.management.jmxremote.authenticate connection authenticate true / false
    -Dcom.sun.management.jmxremote.port jmx connection remote port 1~65535
    -Dcom.sun.management.jmxremote.local.only remote can connection true / false
    -Dcom.sun.management.jmxremote.ssl enable ssl connection true / false
    -Djava.rmi.server.hostname multi eth choose ip / domain
    -Dcom.sun.management.jmxremote.access.file remote access roles file path
    -Dcom.sun.management.jmxremote.password.file remote authenticate file when auth config enable file path

    根据名称,可以猜个大概意思。希望各位在使用时一切操作顺利。

  • 相关阅读:
    大公司?小公司?
    git 学习笔记
    django学习笔记
    web servieces 学习小栗子
    python列表推导式
    什么叫事务,事务的特性
    监听问题汇总
    oracle数据库导入导出
    ORA-12514: TNS: 监听程序当前无法识别连接描述符中请求的服务--解决办法(转)
    目标修正
  • 原文地址:https://www.cnblogs.com/zxg-blog/p/13498328.html
Copyright © 2011-2022 走看看