Last active
August 19, 2016 01:31
-
-
Save arahansa/9e8a41036781b85d709776b1f42d6f18 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# check 7100 port | |
pidNumber=$(lsof -i :7100 | grep java | awk '{print $2}' ) | |
if [ ! -z "$pidNumber" ];then | |
echo "already ** is operating. please command ./kill_7100Port_****.sh" | |
exit | |
fi | |
# check executeFile | |
if [ -z "$1" ];then | |
executeFile=$(ls -Art | grep .jar | tail -n 1) | |
else | |
executeFile=$1 | |
fi | |
echo "*** is executed!" | |
echo "Mode : production , fileName : " $executeFile | |
#-Xms1G -Xmx1G | |
nohup java -XX:+UseParallelOldGC -d64 -server -verbose:gc -Xloggc:/usr/share/tomcat8/logs/****/gc.log -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Dfile.encoding=UTF8 -Dspring.profiles.active=prod -jar $executeFile & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
pidNumber=$(lsof -i :7100 | grep java | awk '{print $2}' ) | |
if [ ! -z "$pidNumber" ];then | |
echo "killing this 7100 port pid : " $pidNumber | |
kill -9 $pidNumber | |
else | |
echo "there is no usage in 7100 port " | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment