summaryrefslogtreecommitdiff
path: root/tools/mapcheck.sh
diff options
context:
space:
mode:
authorbrianluau <brianluau@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-07-27 16:56:26 +0000
committerbrianluau <brianluau@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-07-27 16:56:26 +0000
commita269c22b8d92b56a6b09bc2fa8375d1803cab909 (patch)
tree758a3a283bbfe847cdfde9cd3416f55270fb6844 /tools/mapcheck.sh
parentfc079afd18a8189b8542bc4ec989dc4f123e30a7 (diff)
downloadhercules-a269c22b8d92b56a6b09bc2fa8375d1803cab909.tar.gz
hercules-a269c22b8d92b56a6b09bc2fa8375d1803cab909.tar.bz2
hercules-a269c22b8d92b56a6b09bc2fa8375d1803cab909.tar.xz
hercules-a269c22b8d92b56a6b09bc2fa8375d1803cab909.zip
- Added svn:eol-style native for some conf/css/html/pl/sql/txt files.
- Added svn:executable property for several batch/shell scripts. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13972 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'tools/mapcheck.sh')
-rwxr-xr-x[-rw-r--r--]tools/mapcheck.sh66
1 files changed, 33 insertions, 33 deletions
diff --git a/tools/mapcheck.sh b/tools/mapcheck.sh
index 54cdd0765..337884c43 100644..100755
--- a/tools/mapcheck.sh
+++ b/tools/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