以下容器都在SUSE系统下运行
1、jboss上配置远程监控
修改run.sh,将
JAVA_OPTS="$JAVA_OPTS -Dprogram.name=$PROGNAME "
修改为:
JAVA_OPTS="$JAVA_OPTS -Dprogram.name=$PROGNAME -Djava.rmi.server.hostname=jboss机器的IP地址 -Dcom.sun.management.jmxremote.port=8950
-Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.password.file=$JAVA_HOME/jre/lib/management/jmxremote.password
参数解析
-Djava.rmi.server.hostname=127.0.0.1设置访问的主机地址
-Dcom.sun.management.jmxremote.port=8950 设置端口
-Dcom.sun.management.jmxremote.authenticate=false 不需要认证
-Dcom.sun.management.jmxremote.ssl=false 不需要SSL
如果需要设置用户名和密码,
则 -Dcom.sun.management.jmxremote.authenticate=true
-Dcom.sun.management.jmxremote.password.file=$JAVA_HOME/jre/lib/management/jmxremote.password
在jmxremote.password文件中增加用户名密码即可。
2、weblogic
修改$DOMAIN_HOME/bin/startWeblogic.sh
在JAVA_OPTIONS="${SAVE_JAVA_OPTIONS}"后增加如下代码
if [ "${SERVER_NAME}" = "AdminServer" ] ; then
JAVA_OPTIONS="${JAVA_OPTIONS} -Dcom.sun.management.jmxremote.port=8952 -Dcom.sun.management.jmxremote.pwd.file=${DOMAIN_HOME}/bin/jmxremote.password -Dcom.sun.management.jmxremote.authenticate=true -Dcom.sun.management.jmxremote.ssl=false"
fi
其中AdminServer是管理服务器的服务名称。
3、tomcat
修改catalina.sh
修改catalina.sh,在dorun和dostart段开头增加一行(注意是一行):
JAVA_OPTS="$JAVA_OPTS "-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9004 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
4、jconsole参数解析
http://c20031776.blog.163.com/blog/static/6847162520110214513966/
jconsole远程监控配置方法
猜你喜欢
转载自newslxw.iteye.com/blog/1013555
今日推荐
周排行