#!/bin/bash host=`ifconfig eth0 | grep 'inet addr' | awk '{print $2}'|awk -F : '{print $2}'` nohup java -Xmx8G \ -XX:+UseG1GC \ -XX:MaxGCPauseMillis=200 \ -XX:ConcGCThreads=2 \ -XX:+PrintGC \ -XX:+PrintHeapAtGC \ -XX:+PrintGCDetails \ -XX:+PrintGCTimeStamps \ -XX:+HeapDumpOnOutOfMemoryError \ -XX:HeapDumpPath=/home/admin \ -XX:+PrintGCApplicationStoppedTime \ -Xloggc:gc.log \ -XX:OnError="echo error" \ -XX:OnOutOfMemoryError="echo OnOutOfMemoryError" \ -Dcom.sun.management.jmxremote \ -Dcom.sun.management.jmxremote.authenticate=false \ -Dcom.sun.management.jmxremote.port=10055 \ -Dcom.sun.management.jmxremote.ssl=false \ -Djava.rmi.server.hostname=${host} \ -jar /home/admin/nirvana-slice/sharding/target/nirvana.jar &> /dev/null < /dev/null & exit 0