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

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

  • 相关阅读:
    PC software
    pdf.js查看器 在线预览 office文件、图片、文本文件
    核算两个时间之间时长
    Flink sql 之 join 与 StreamPhysicalJoinRule (源码解析)
    Flink sql 之 TopN 与 StreamPhysicalRankRule (源码解析)
    Flink Sql 之 Calcite Volcano优化器(源码解析)
    Keepalive高可用部署
    Keepalive配置文件
    Erlang环境安装
    ZooKeeper集群
  • 原文地址:https://www.cnblogs.com/zxg-blog/p/13498328.html
Copyright © 2011-2022 走看看