Java开启JMX远程监控服务配置
作者:YYGP 时间:2021-11-02 01:14:43
1. 服务端配置
java启动命令增加以下参数即可:
-Dcom.sun.management.jmxremote \
-Dcom.sun.management.jmxremote.local.only=false \
-Djava.rmi.server.hostname=test.xxx.com \
-Dcom.sun.management.jmxremote.port=18097 \
-Dcom.sun.management.jmxremote.rmi.port=18098 \
-Dcom.sun.management.jmxremote.ssl=false \
-Dcom.sun.management.jmxremote.authenticate=false \
-Xloggc:logs/gc.log \
参数说明:
不开启SSL-Dcom.sun.management.jmxremote.ssl=false
不开启密码验证-Dcom.sun.management.jmxremote.authenticate=false
2. 客户端配置
打开Java VisualVM
配置远程连接连接
注意项:
主机填-Djava.rmi.server.hostname 配置的主机
端口填-Dcom.sun.management.jmxremote.port 配置的端口
配置-Dcom.sun.management.jmxremote.rmi.port 不能省略
来源:https://segmentfault.com/a/1190000043823326
标签:Java,JMX,远程监控
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
java实现简单石头剪刀布游戏
2023-07-20 05:31:37
![](https://img.aspxhome.com/file/2023/8/57628_0s.jpg)
Java日常练习题,每天进步一点点(7)
2023-11-27 00:34:58
![](https://img.aspxhome.com/file/2023/8/59978_0s.png)
Java中的Unsafe在安全领域的使用总结和复现(实例详解)
2023-07-30 10:58:42
![](https://img.aspxhome.com/file/2023/6/64896_0s.png)
java基础的详细了解第七天
2023-02-01 12:06:26
![](https://img.aspxhome.com/file/2023/0/63700_0s.png)
详解ThreadLocal为什么会内存溢出原理
2023-11-09 18:45:26
![](https://img.aspxhome.com/file/2023/3/59183_0s.png)
Mybatis中 mapper-locations和@MapperScan的作用
2023-07-13 08:08:34
![](https://img.aspxhome.com/file/2023/0/57700_0s.png)
java线程池ThreadPoolExecutor的八种拒绝策略示例详解
2021-06-24 11:31:10
![](https://img.aspxhome.com/file/2023/0/64390_0s.png)
探讨:将两个链表非降序合并为一个链表并依然有序的实现方法
2023-06-23 01:41:38
利用Java自写一个生成ID的工具类
2023-04-24 04:10:08
SpringBoot整合java诊断工具Arthas解读
2023-08-07 10:39:03
![](https://img.aspxhome.com/file/2023/0/69920_0s.png)
java 注解默认值操作
2023-08-25 20:31:38
java语言基础之标识符和命名规则详解
2023-04-21 16:50:18
![](https://img.aspxhome.com/file/2023/5/71895_0s.png)
Spring boot + mybatis + Vue.js + ElementUI 实现数据的增删改查实例代码(一)
2021-12-29 08:15:07
![](https://img.aspxhome.com/file/2023/5/65725_0s.jpg)
java中JSONObject转换为HashMap(方法+main方法调用实例)
2023-08-10 04:04:08
![](https://img.aspxhome.com/file/2023/7/68187_0s.png)
Spring Boot实现文件上传下载
2021-11-22 21:19:36
![](https://img.aspxhome.com/file/2023/3/71693_0s.jpg)
使用注解@Validated效验VO参数是否合规
2023-10-27 20:13:01
SpringBoot2整合Ehcache组件实现轻量级缓存管理
2022-06-18 18:11:16
JAVA复制数组和重置数组大小操作
2021-08-29 02:02:41
![](https://img.aspxhome.com/file/2023/1/64751_0s.jpg)
MyBatis-Plus 查询返回实体对象还是map
2023-11-28 03:20:19
基于Spring-Security自定义登陆错误提示信息
2021-09-20 17:33:40
![](https://img.aspxhome.com/file/2023/2/70352_0s.png)