一、Java虚拟机参数
JAVA Memory arguments: -Xverbose:exceptions=debug -Xverbose:memory -Xverbose:cpuinfo -Xverboselog:/root/weblogicboot/myFile.log -Xverbosetimestamp -Xms4096m -Xmx4096m -XX:+HeapDumpOnOutOfMemoryError
说明:
-Xverbose:exceptions=debug
异常打印级别
-Xverbose:memory
开启JRokit GC日志报告,显示在运行期间每一次垃圾回收的运行时间
-Xverboselog:/root/weblogicboot/myFile.log
GC日志路径
-Xverbose:cpuinfo
打印CPU信息
-Xms4096m
设置初始堆内存大小
-Xmx4096m
设置最大堆内存大小
-XX:+HeapDumpOnOutOfMemoryError
在OutOfMemory时,产生.hprof的Dump文件
-Xverbosetimestamp
在打印进度消息时增加时间戳
二、weblogic设置方式
设置域环境(setDomainEnv.sh)
# *************************************************************************
# This script is used to setup the needed environment to be able to start Weblogic Server in this domain.
#
# This script initializes the following variables before calling commEnv to set other variables:
#
# WL_HOME - The BEA home directory of your WebLogic installation.
# JAVA_VM - The desired Java VM to use. You can set this environment variable before calling
# this script to switch between Sun or BEA or just have the default be set.
# JAVA_HOME - Location of the version of Java used to start WebLogic
# Server. Depends directly on which JAVA_VM value is set by default or by the environment.
# USER_MEM_ARGS - The variable to override the standard memory arguments
# passed to java.
# PRODUCTION_MODE - The variable that determines whether Weblogic Server is started in production mode.
# DOMAIN_PRODUCTION_MODE
# - The variable that determines whether the workshop related settings like the debugger,
# testconsole or iterativedev should be enabled. ONLY settable using the
# command-line parameter named production
# NOTE: Specifying the production command-line param will force
# the server to start in production mode.
#
# Other variables used in this script include:
# SERVER_NAME - Name of the weblogic server.
# JAVA_OPTIONS - Java command-line options for running the server. (These
# will be tagged on to the end of the JAVA_VM and
# MEM_ARGS)
#
# For additional information, refer to "Managing Server Startup and Shutdown for Oracle WebLogic Server"
# (http://download.oracle.com/docs/cd/E14571_01/web.1111/e13708/overview.htm).
# *************************************************************************
说明:
WL_HOME
代表weblogic的安装目录,例如:WL_HOME="/bea/Oracle/Middleware/wlserver_10.3"
JAVA_VM
代表java虚拟机型号?不知道这个值是多少,有配置:JAVA_VM="${JAVA_VM} ${JAVA_DEBUG} ${JAVA_PROFILE}"
JAVA_HOME
代表启动weblogic服务的本地的java版本,依赖于环境变量中JAVA_VM设置的值
USER_MEM_ARGS
代表用户定义的虚拟机内存参数,例如:USER_MEM_ARGS="-Xverbose:exceptions=debug -Xverbose:memory -Xverbose:cpuinfo -Xverboselog:/root/weblogicboot/myFile.log -Xverbosetimestamp -Xms4096m -Xmx4096m -XX:+HeapDumpOnOutOfMemoryError"
PRODUCTION_MODE
代表weblogic服务器是否在生产模式还是开发模式,例如:PRODUCTION_MODE="true"
DOMAIN_PRODUCTION_MODE
代表工作区是否设置生产模式,如设置为生产模式会覆盖PRODUCTION_MODE
if [ "${DOMAIN_PRODUCTION_MODE}" = "true" ] ; then
PRODUCTION_MODE="${DOMAIN_PRODUCTION_MODE}"
export PRODUCTION_MODE
fi
SERVER_NAME
代表weblogic服务器名称,例如:
if [ "${SERVER_NAME}" = "" ] ; then
SERVER_NAME="pbcs"
export SERVER_NAME
fi
JAVA_OPTIONS
代表运行服务器时的java命令行参数,这些值会打在JAVA_VM和MEM_ARGS参数后面
参考资料:
http://www.blogjava.net/beansoft/archive/2012/03/01/371088.html
https://blog.csdn.net/xiaoyi23000/article/details/49794657