1
This commit is contained in:
parent
6333ac8ad4
commit
9fad4f67b3
11
server/bin/monitor.sh
Normal file
11
server/bin/monitor.sh
Normal file
@ -0,0 +1,11 @@
|
||||
path_arr=$(echo $PWD|tr '/' '\n')
|
||||
path_arr=(${path_arr})
|
||||
GAME_ID=${path_arr[-5]}
|
||||
|
||||
if echo $GAME_ID | grep -q '[^0-9]'
|
||||
then
|
||||
echo 'game_id参数必须为数字'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
python ../../third_party/tools/scripts/server/monitor.py gameserver${GAME_ID} '-n1 -i1'
|
10
server/bin/real_start_instance.sh
Executable file
10
server/bin/real_start_instance.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
source /etc/profile
|
||||
source /root/.bash_profile
|
||||
|
||||
./gameserver2005 -n $1 -i $2 >> gameserver2005$2_$1.out
|
||||
echo $? >> start.log
|
||||
date >> start.log
|
||||
echo $1 $2 >> start.log
|
||||
free -m >> start.log
|
16
server/bin/restart.sh
Executable file
16
server/bin/restart.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
source /etc/profile
|
||||
source /root/.bash_profile
|
||||
|
||||
pid=$(ps -ef|grep "gameserver2005 -n $2 -i $1"|grep -v grep|awk '{print $2}')
|
||||
echo $pid
|
||||
|
||||
if [[ $pid != "" ]]
|
||||
then
|
||||
echo $pid|xargs kill -9
|
||||
else
|
||||
echo "pid 为空"
|
||||
fi
|
||||
|
||||
nohup ./gameserver2005 -n $2 -i $1 >> gameserver2005$2_$1.out &
|
3
server/bin/start_instance.sh
Executable file
3
server/bin/start_instance.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
nohup sh real_start_instance.sh 1 1 2>&1 &
|
Loading…
x
Reference in New Issue
Block a user