2 # Copyright (C) 2015 CMCC, Inc. and others. All rights reserved. (CMCC)
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
16 #JAVA_HOME="/home/conductortest/jdk1.7/jdk/linux"
19 RUNHOME=`cd $DIRNAME/; pwd`
21 echo @RUNHOME@ $RUNHOME
23 # JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::")
24 echo @JAVA_HOME@ $JAVA_HOME
25 JAVA="$JAVA_HOME/bin/java"
28 JAVA_OPTS="-Xms50m -Xmx128m"
31 if [ $OSNAME = "Linux" ]; then
33 if [ $PLATFORM = "x86_64" ] ;then
34 if [ -d $JAVA_HOME/jre/lib/i386 ]; then
35 echo "This is a 32-bit JVM runs on 64-bit system."
36 library="$RUNHOME/conf/system/native/linux"
38 echo "This is a 64-bit JVM runs on 64-bit system."
39 library="$RUNHOME/conf/system/native/linux-x86-64"
41 elif [ $PLATFORM = "ia64" ] ;then
42 library="$RUNHOME/conf/system/native/linux-ia64"
44 library="$RUNHOME/conf/system/native/linux"
48 if [ $OSNAME = "SunOS" ] ;then
50 if [ $PLATFORM = "i386" ] ;then
51 library="$RUNHOME/conf/system/native/solaris-x86-32"
54 if [ $PLATFORM = "sparc" ] ;then
57 if [ $SYS_BIT = "64" ] ;then
58 JAVA_OPTS="$JAVA_OPTS -d64"
59 library="$RUNHOME/conf/system/native/solaris64"
61 library="$RUNHOME/conf/system/native/solaris"
66 if [ $OSNAME = "AIX" ] ;then
68 if [ $PLATFORM = "powerpc" ] ;then
69 library="$RUNHOME/conf/system/native/aix-64"
73 JAVA_OPTS="$JAVA_OPTS -Djava.library.path=$library"
75 date_time_string=`date +%Y-%m-%d-%H-%M-%S`
76 if [ $OSNAME != "AIX" ] ;then
77 dump_file_name="dump-dac-$date_time_string.hprof"
78 JAVA_OPTS="$JAVA_OPTS -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=$RUNHOME/logs/$dump_file_name"
80 JAVA_OPTS="$JAVA_OPTS -Xdump:none"
81 JAVA_OPTS="$JAVA_OPTS -Xdump:system:events=gpf+abort+traceassert,range=1..0,priority=999,request=serial,label=$RUNHOME/logs/core-dac-$date_time_string.dmp"
82 JAVA_OPTS="$JAVA_OPTS -Xdump:heap:events=systhrow,filter=java/lang/OutOfMemoryError,range=1..1,priority=500,request=exclusive+compact+prepwalk,label=$RUNHOME/logs/dump-dac-$date_time_string.phd"
83 JAVA_OPTS="$JAVA_OPTS -Xdump:heap:events=user,priority=500,request=exclusive+compact+prepwalk,label=$RUNHOME/logs/dump-dac-user-$date_time_string.phd"
88 # JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=$port,server=y,suspend=n"
89 echo @JAVA_OPTS@ $JAVA_OPTS
91 #class_path="$RUNHOME/:$RUNHOME/boco-driver.jar:$RUNHOME/3rdParty/evel_javalib2-0.0.1.jar"
92 class_path="$RUNHOME/:$RUNHOME/boco-driver.jar"
93 echo @class_path@ $class_path
95 "$JAVA" $JAVA_OPTS -classpath "$class_path" org.onap.vfc.nfvo.emsdriver.EmsDriverApplication server "$RUNHOME/conf/emsdriver.yml"