最近新搭建了系统环境,进行压力测试的时候没有一个好的图形化监控方法来比较直观、方便、动态、实时的来监控应用服务器内存、GC、CPU、进程和磁盘等信息,功能非常强大,图像也很友好。但是wildfy配置jmx的文章资料很少,我通过参考官网和一些贴吧实践琢磨出了配置jmx的流程:
1】确认监控端口(一般都是8080端口)
standalone:查看standalone.xml中jboss.http.port为8080
domain:查看standalone.xml中jboss.http.port为8080
# netstat -anlp | grep 8080
tcp 0 0 192.168.101.11:8080 0.0.0.0:* LISTEN 21558/java
------------------------------------------------------------------------------------------------------------------------------------------
2】通过wildfly的module.xml文件中添加jboss远程监控模块,并启用该模块
standalone:
vim /opt/wildfly/modules/system/layers/base/org/wildfly/extension/io/main/module.xml
domain:
vim /opt/jboss/modules/system/layers/base/org/wildfly/extension/io/main/module.xml
添加,并启用:
<module name="org.jboss.remoting" export="true"/>