zoukankan      html  css  js  c++  java
  • VisualVm使用JMX的方式连接远程JVM

    1、在catalina.sh中添加配置如下:

    在其中“# ----- Execute The Requested Command -------------”之前插入一行(中间没有换行):

    CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8999 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname=机器IP"

    特别注意:-Djava.rmi.server.hostname=机器IP这一行需要加上,不然可能本机能连上,远程连不上。很多帖子中的介绍配置没有这一行。

    2、lsof -i:8999查看端口状态:

    3、使用visualVm监控远程虚拟机:相对于使用jstatd的监控,使用jmx的方式会有更多的可以监控的功能,如Threads等。

    4、为了安全起见,可以采用配置鉴权的方式,详见参考文献中的介绍。本文不再赘述

    参考文献:https://blog.csdn.net/liuxigiant/article/details/40344699

    http://tomcat.apache.org/tomcat-7.0-doc/monitoring.html#Enabling_JMX_Remote

  • 相关阅读:
    window10使用vagrant+virtualBox搭建centos7
    吾日三思
    搭建EFK过程
    docker端口映射失效解决方法
    centos7防火墙相关命令
    docker学习
    python 读取hive数据
    shell 命令 查看本机ip
    shell 命令 修改hosts文件
    shell 命令 mkdir -p
  • 原文地址:https://www.cnblogs.com/liclBlog/p/15349471.html
Copyright © 2011-2022 走看看