启动
远程Debug启动:
nohup java -jar -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=0.0.0.0:5555 xxxxxx.jar > run.out 2>&1 &
普通启动:
nohup java -jar xxxxxx.jar > run.out 2>&1 &
查看状态
count=$(ps -ef | grep xxxxxx.jar | grep -v grep | wc -l)
if [ $count -eq 0 ]; then
echo 'not running......'
else
echo 'running......'
fi
杀掉进程
ps -ef | grep xxxxxx.jar | grep -v grep | awk '{print $2}' | xargs kill -9