RESOURCE_NAME=ktwjs-socket.jar
stop(){
#kill 掉所有java程序
PROCESS=`ps -ef|grep $RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
for pid in $PROCESS
do
echo "kill the $RESOURCE_NAME process [ $pid ]"
kill -9 $pid
done
}
stop
#ps -ef|grep $RESOURCE_NAME | grep -v grep | awk '{print $2}' | xargs kill -9
nohup java -Xverify:none -XX:+HeapDumpOnOutOfMemoryError -Dtio.default.read.buffer.size=512 -XX:HeapDumpPath=/logs/java-t-io-ktqyc-server-pid.hprof -cp /home/q/kt-server-deploy/socket-server/$RESOURCE_NAME org.tio.ktqyc.socket.server.WjsServerStarter prod &
#tail -f ./nohup.out
网友评论