通过jconsole监控websphere application server

通过jconsole可以查看本地或者远程jvm的一些概况,比如jvm内存,线程以及一些MBean等等的情况,普通的java程序只要在启动时添加下面的java options就可以直接通过jconsole监控到此java程序的jvm概况。
-Dcom.sun.management.jmxremote.port=1090
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false

打开jconsole,在%JAVA_HOME%\bin下面,然后输入java程序所在的机器ip和上面java options指定的端口号就可以连接了。格式为ip:1090

但是对于websphere,却有些不一样,下面介绍其中一种方式:

# 首先在webshpere server的安装机器上创建一个文件management.properties,在文件上输入如下内容:
-Dcom.sun.management.jmxremote.port=1090
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
# 打开websphere的控制台,打开jvm config页面,添加下面的java options
-Djavax.management.builder.initial=
-Dcom.sun.management.jmxremote
-Dcom.sun.management.config.file=management.properties(刚才创建的文件的路径)
# 打开jconsole,跟上面一样输入ip:1090,就可以监控到websphere server的jvm概况了。

猜你喜欢

转载自bkhh.iteye.com/blog/1871790