2025-03-19 10:28:25 +08:00

72 lines
1.5 KiB
Bash

#!/usr/bin/sh
if [ -z "$WMS_BASE" ] ; then
echo "WMS_BASE not found."
fi
### ADD WMS_OPTS
if [ -z "$JAVA_OPTS" ] ; then
JAVA_OPTS=
fi
JAVA_OPTS=" -Xms$3 -Xmx$4 -server "
### WMS_OPTS
IDMFRAME_FLOW_BPELJ=http://bpel.boe.com/bpelj
COMPANY=BOE
FACTORY=MLED
CIM=WMS
SVR=$1
if [[ `hostname` = 'wmsdev' ]]
then
MODE=DEV
elif [[ `hostname` = 'm2wmsap2' ]]
then
MODE=PRD
elif [[ `hostname` = 'm2wmsap1' ]]
then
MODE=PRD
else
MODE=PRD
fi
if [[ `hostname` = 'wmsap1' ]]
then
SEQ="$SVR"1"$2"
elif [[ `hostname` = 'wmsap2' ]]
then
SEQ="$SVR"2"$2"
elif [[ `hostname` = 'wmsap3' ]]
then
SEQ="$SVR"3"$2"
else
SEQ="$SVR"1"$2"
fi
echo $1 $2 $3 $4
if [ -z "$CONFIG_ROOT_PATH" ] ; then
CONFIG_ROOT_PATH="$WMS_BASE"/conf
fi
if [ -z "$LOGDIR" ] ; then
LOGDIR="$WMS_BASE"/logs
fi
if [ -z "$WMS_OPTS" ] ; then
WMS_OPTS=
fi
if [[ ! -d $LOGDIR/gc ]] ; then
mkdir -p $LOGDIR/gc
fi
if [[ ! -d "$LOGDIR/jvmstoplog" ]] ; then
mkdir -p "$LOGDIR/jvmstoplog"
fi
WMS_OPTS="-DconfigRootPath=$CONFIG_ROOT_PATH -Dcompany=$COMPANY -Dfactory=$FACTORY -Dcim=$CIM -Dmode=$MODE -Dsvr=$SVR -DSeq=$SEQ -Didmframe.flow.bpelj=$IDMFRAME_FLOW_BPELJ -DLOGDIR=$LOGDIR "
#JAVA_OPTS="$JAVA_OPTS -XX:+UseParallelGC -XX:+UseParallelOldGC -XX:ParallelGCThreads=8 -XX:+UseAdaptiveSizePolicy -verbose:gc -Xloggc:$LOGDIR/gc/$SEQ.gc -XX:+PrintGCDetails -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCDateStamps -XX:+PrintHeapAtGC -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=$LOGDIR/jvmstoplog -XX:ErrorFile=$LOGDIR/jvmstoplog/$SEQ.log "
#echo "$WMS_OPTS"
#echo "$JAVA_OPTS"