diff options
author | amber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-11-14 16:18:26 +0000 |
---|---|---|
committer | amber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-11-14 16:18:26 +0000 |
commit | 581475bc6416790765c498aa3d611f6868ffb64a (patch) | |
tree | 347ebf88eaa76e50488f23989d67cad834f3c9b1 /tool/mapcheck.sh | |
parent | 600362764ce348c5c9de96eababff2e08bb90d4a (diff) | |
download | hercules-581475bc6416790765c498aa3d611f6868ffb64a.tar.gz hercules-581475bc6416790765c498aa3d611f6868ffb64a.tar.bz2 hercules-581475bc6416790765c498aa3d611f6868ffb64a.tar.xz hercules-581475bc6416790765c498aa3d611f6868ffb64a.zip |
Fixed some file types
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/athena@172 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'tool/mapcheck.sh')
-rw-r--r-- | tool/mapcheck.sh | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/tool/mapcheck.sh b/tool/mapcheck.sh index 54cdd0765..337884c43 100644 --- a/tool/mapcheck.sh +++ b/tool/mapcheck.sh @@ -1,34 +1,34 @@ -#!/bin/sh
-echo "============================================"
-echo "= map server status checker... ="
-echo "============================================"
-./map-server.exe &
-sleep 40
-
-while [ 0 ]
-do
- pcpu=` top -n 1| grep map-server | awk '{print $9}' | awk 'BEGIN{FS="."} {print $1}' `
- if [ "$pcpu" -gt 80 ];then
- echo "============================================"
- echo "map server is more than 80% (now $pcpu%)"
- echo "============================================"
- ppid=` ps -a | grep map-server | awk '{print $1}' `
- kill $ppid
- ./map-server.exe &
- sleep 40
- else
- pmapct=` ps -a| grep map-server | wc -l `
- if [ "$pmapct" -eq 0 ];then
- echo "============================================"
- echo "map server is not running..."
- echo "restart map server..."
- echo "============================================"
- ./map-server.exe &
- sleep 40
- #echo "test"
- else
- echo "map server is ok (now $pcpu%)..."
- sleep 5
- fi
- fi
+#!/bin/sh +echo "============================================" +echo "= map server status checker... =" +echo "============================================" +./map-server.exe & +sleep 40 + +while [ 0 ] +do + pcpu=` top -n 1| grep map-server | awk '{print $9}' | awk 'BEGIN{FS="."} {print $1}' ` + if [ "$pcpu" -gt 80 ];then + echo "============================================" + echo "map server is more than 80% (now $pcpu%)" + echo "============================================" + ppid=` ps -a | grep map-server | awk '{print $1}' ` + kill $ppid + ./map-server.exe & + sleep 40 + else + pmapct=` ps -a| grep map-server | wc -l ` + if [ "$pmapct" -eq 0 ];then + echo "============================================" + echo "map server is not running..." + echo "restart map server..." + echo "============================================" + ./map-server.exe & + sleep 40 + #echo "test" + else + echo "map server is ok (now $pcpu%)..." + sleep 5 + fi + fi done
\ No newline at end of file |