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