jmx tomcat 发表于 2018-02-22 | 分类于 java 12345678910111213141516171819202122232425262728293031323334353637#!/bin/shexport TOMCAT_USER="tomcat"export JAVA_OPTS="-Xms4096m -Xmx4096m -XX:+UseG1GC -XX:MaxGCPauseMillis=300 -server -XX:+DisableExplicitGC -Dqnr.logs=$CATALINA_BASE/logs -Dqnr.cache=$CATALINA_BASE/cache -verbose:gc -XX:+PrintGCDateStamps -XX:+PrintGCDetails -Xloggc:$CATALINA_BASE/logs/gc.log-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/home/q/www/mobiledcs-hbase-server/temp/oom -Djava.rmi.server.hostname=10.90.14.87 -Dcom.sun.management.jmxremote.port=1098 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=true -Dcom.sun.management.jmxremote.password.file=/home/q/java/default/jre/lib/management/jmxremote.password -Dcom.sun.management.jmxremote.access.file=/home/q/java/default/jre/lib/management/jmxremote.access"# export JAVA_OPTS="-Xms4096m -Xmx4096m -XX:NewSize=512m -XX:PermSize=512m -server -XX:+DisableExplicitGC -Dqnr.logs=$CATALINA_BASE/logs -Dqnr.cache=$CATALINA_BASE/cache -verbose:gc -XX:+PrintGCDateStamps -XX:+PrintGCDetails -Xloggc:$CATALINA_BASE/logs/gc.log# -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/home/q/www/mobiledcs-hbase-server/temp/oom # -Djava.rmi.server.hostname=10.90.14.87 # -Dcom.sun.management.jmxremote.port=1098 # -Dcom.sun.management.jmxremote.ssl=false # -Dcom.sun.management.jmxremote.authenticate=true # -Dcom.sun.management.jmxremote.password.file=/home/q/java/default/jre/lib/management/jmxremote.password # -Dcom.sun.management.jmxremote.access.file=/home/q/java/default/jre/lib/management/jmxremote.access"chown -R tomcat:tomcat $CATALINA_BASE/logschown -R tomcat:tomcat $CATALINA_BASE/cachechown -R tomcat:tomcat $CATALINA_BASE/confchown -R tomcat:tomcat $CATALINA_BASE/workchown -R tomcat:tomcat $CATALINA_BASE/temp/home/q/java/default/jre/lib/management/jmxremote.passwordmonitorRole 1qaz@WSXcontrolRole 1qaz@WSX/home/q/java/default/jre/lib/management/jmxremote.accessmonitorRole readonlycontrolRole readwrite \ create javax.management.monitor.*,javax.management.timer.* \ unregister