Umesh Krishnaswamy | b676ca2 | 2013-01-11 12:39:25 -0800 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | # Set paths |
| 4 | FL_HOME=`dirname $0` |
| 5 | FL_JAR="${FL_HOME}/target/floodlight.jar" |
| 6 | FL_LOGBACK="${FL_HOME}/logback.xml" |
| 7 | |
| 8 | # Set JVM options |
| 9 | JVM_OPTS="" |
| 10 | #JVM_OPTS="$JVM_OPTS -server -d64" |
| 11 | #JVM_OPTS="$JVM_OPTS -Xmx2g -Xms2g -Xmn800m" |
| 12 | #JVM_OPTS="$JVM_OPTS -XX:+UseParallelGC -XX:+AggressiveOpts -XX:+UseFastAccessorMethods" |
| 13 | #JVM_OPTS="$JVM_OPTS -XX:MaxInlineSize=8192 -XX:FreqInlineSize=8192" |
| 14 | #JVM_OPTS="$JVM_OPTS -XX:CompileThreshold=1500 -XX:PreBlockSpin=8" |
| 15 | #JVM_OPTS="$JVM_OPTS -Dpython.security.respectJavaAccessibility=false" |
| 16 | |
| 17 | # Set classpath to include titan libs |
| 18 | CLASSPATH=`echo ${FL_HOME}/lib/*.jar ${FL_HOME}/lib/titan/*.jar | sed 's/ /:/g'` |
| 19 | |
| 20 | |
| 21 | # Create a logback file if required |
| 22 | cat <<EOF_LOGBACK >${FL_LOGBACK} |
| 23 | <configuration scan="true" debug="true"> |
| 24 | <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> |
| 25 | <encoder> |
| 26 | <pattern>%level [%logger:%thread] %msg%n</pattern> |
| 27 | </encoder> |
| 28 | </appender> |
| 29 | |
| 30 | <appender name="FILE" class="ch.qos.logback.core.FileAppender"> |
| 31 | <file>onos.log</file> |
| 32 | <encoder> |
| 33 | <pattern>%date %level [%thread] %logger{10} [%file:%line] %msg%n</pattern> |
| 34 | </encoder> |
| 35 | </appender> |
| 36 | |
| 37 | <logger name="org" level="WARN"/> |
| 38 | <logger name="LogService" level="WARN"/> <!-- Restlet access logging --> |
| 39 | <logger name="net.floodlightcontroller.logging" level="WARN"/> |
| 40 | |
| 41 | <root level="DEBUG"> |
| 42 | <appender-ref ref="STDOUT" /> |
| 43 | <appender-ref ref="FILE" /> |
| 44 | </root> |
| 45 | </configuration> |
| 46 | EOF_LOGBACK |
| 47 | |
| 48 | # Delete and recreate /tmp/netmap |
Jonathan Hart | 5a02304 | 2013-02-05 16:15:49 -0800 | [diff] [blame] | 49 | #rm -rf /tmp/cassandra.titan |
| 50 | #mkdir /tmp/cassandra.titan |
Umesh Krishnaswamy | 84f0cac | 2013-01-23 19:07:13 -0800 | [diff] [blame] | 51 | |
| 52 | # Clear logs |
| 53 | rm onos.log |
Umesh Krishnaswamy | b676ca2 | 2013-01-11 12:39:25 -0800 | [diff] [blame] | 54 | |
| 55 | # Run floodlight |
| 56 | echo "Starting ONOS controller ..." |
| 57 | echo |
Jonathan Hart | c0e113a | 2013-02-05 17:27:21 -0800 | [diff] [blame] | 58 | #java ${JVM_OPTS} -Dlogback.configurationFile=${FL_LOGBACK} -Xbootclasspath/a:$CLASSPATH -jar ${FL_JAR} -cf ./onos.properties |
| 59 | java ${JVM_OPTS} -Dlogback.configurationFile=${FL_LOGBACK} -jar ${FL_JAR} -cf ./onos.properties |