原创

weblogic启动参数优化

脚本

#!/bin/bash
DATE=`date '+%Y%m%d%H%M'`
TODAY=`date '+%Y%m%d'`


export DOMAIN_BASE=/res/domains
export DOMAIN_NAME=resdomain01
export DOMAIN_HOME=${DOMAIN_BASE}/${DOMAIN_NAME}
export DOMAIN_LOG=/applogs/res


export USER_MEM_ARGS="-Xms4096m -Xmx4096m -XX:MaxPermSize=1024m -Xrs"
export JAVA_OPTIONS="${JAVA_OPTIONS} -verbose:gc -Xloggc:${DOMAIN_LOG}/${DOMAIN_NAME}_gc_${DATE}.log -XX:-PrintGC -XX:-PrintGCDetails -XX:-PrintGCTimeStamps"

export JAVA_OPTIONS="${JAVA_OPTIONS} -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./" 
export JAVA_OPTIONS="${JAVA_OPTIONS} -Djava.security.egd=file:/dev/./urandom -Djava.net.preferIPv4Stack=true"
export JAVA_OPTIONS="${JAVA_OPTIONS} -Dweblogic.threadpool.MinPoolSize=10"
#export JAVA_OPTIONS="${JAVA_OPTIONS} -Dcom.sun.management.jmxremote.port=8999 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremo
te.ssl=false -Djava.rmi.server.hostname=192.168.75.128"
export JAVA_OPTIONS="${JAVA_OPTIONS} -Dweblogic.system.BootIdentityFile=${DOMAIN_HOME}/boot.properties"
export JAVA_OPTIONS="${JAVA_OPTIONS} -Dweblogic.Domain=${DOMAIN_NAME}"


JAVA_OPTIONS="${JAVA_OPTIONS} -javaagent:/res/applications/APM/strace_agent/pinpoint-bootstrap-1.6.0.jar"
JAVA_OPTIONS="${JAVA_OPTIONS} -Dpinpoint.agentId=resapp_23.11"
JAVA_OPTIONS="${JAVA_OPTIONS} -Dpinpoint.applicationName=resapp_23.11"
export JAVA_OPTIONS

cd ${DOMAIN_HOME}

#nohup ./startWebLogic.sh 2>&1 | ${DOMAIN_HOME}/bin/cronolog -k 14  ${DOMAIN_LOG}/${DOMAIN_NAME}_${TODAY}.out &
nohup ./startWebLogic.sh 2>&1 | ${DOMAIN_HOME}/bin/cronolog  ${DOMAIN_LOG}/${DOMAIN_NAME}_${TODAY}.out &
#nohup ./startWebLogic.sh 2>&1 > ${DOMAIN_LOG}/${DOMAIN_NAME}_${TODAY}.out & 
#tail -f ${DOMAIN_LOG}/${DOMAIN_NAME}_${TODAY}.out


echo "Start success."
正文到此结束