forked from weibocom/motan
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
84 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,4 +33,3 @@ target/ | |
.DS_Store | ||
Thumbs.db | ||
logs/ | ||
bin/ |
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
20 changes: 20 additions & 0 deletions
20
motan-benchmark/motan-benchmark-client/src/main/bin/start.sh
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
DIR=`pwd` | ||
cd `dirname $0` | ||
cd ../lib | ||
LIB_DIR=`pwd` | ||
|
||
SERVER_NAME='com.weibo.motan.benchmark.MotanBenchmarkClient' | ||
|
||
PIDS=`ps -ef | grep java | grep "$LIB_DIR" | grep ${SERVER_NAME} | awk '{print $2}'` | ||
if [ -n "$PIDS" ]; then | ||
echo "start failed, the $SERVER_NAME already started!" | ||
exit 1 | ||
fi | ||
|
||
LIB_JARS=`ls ${LIB_DIR} | grep .jar | awk '{print "'${LIB_DIR}'/"$0}' | tr "\n" ":"` | ||
cd .. | ||
nohup java -classpath ${LIB_JARS} ${SERVER_NAME} nohup.client.out 2>&1 & | ||
|
||
echo "start "${SERVER_NAME}" success!" | ||
cd ${DIR} |
21 changes: 21 additions & 0 deletions
21
motan-benchmark/motan-benchmark-client/src/main/bin/stop.sh
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
DIR=`pwd` | ||
cd `dirname $0` | ||
cd ../lib | ||
LIB_DIR=`pwd` | ||
|
||
SERVER_NAME='com.weibo.motan.demo.client.DemoRpcClient' | ||
|
||
PIDS=`ps -ef | grep java | grep "$LIB_DIR" | grep ${SERVER_NAME} | awk '{print $2}'` | ||
if [ -z "$PIDS" ]; then | ||
echo "stop failed, the $SERVER_NAME not start!" | ||
exit 1 | ||
fi | ||
|
||
for PID in ${PIDS}; | ||
do | ||
kill ${PID} > /dev/null 2>&1 | ||
done | ||
|
||
echo "stop success! pid:"${PIDS} | ||
cd ${DIR} |
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
20 changes: 20 additions & 0 deletions
20
motan-benchmark/motan-benchmark-server/src/main/bin/start.sh
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
DIR=`pwd` | ||
cd `dirname $0` | ||
cd ../lib | ||
LIB_DIR=`pwd` | ||
|
||
SERVER_NAME='com.weibo.motan.benchmark.MotanBenchmarkServer' | ||
|
||
PIDS=`ps -ef | grep java | grep "$LIB_DIR" | grep ${SERVER_NAME} | awk '{print $2}'` | ||
if [ -n "$PIDS" ]; then | ||
echo "start failed, the $SERVER_NAME already started!" | ||
exit 1 | ||
fi | ||
|
||
LIB_JARS=`ls ${LIB_DIR} | grep .jar | awk '{print "'${LIB_DIR}'/"$0}' | tr "\n" ":"` | ||
cd .. | ||
nohup java -classpath ${LIB_JARS} ${SERVER_NAME} nohup.server.out 2>&1 & | ||
|
||
echo "start "${SERVER_NAME}" success!" | ||
cd ${DIR} |
21 changes: 21 additions & 0 deletions
21
motan-benchmark/motan-benchmark-server/src/main/bin/stop.sh
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
DIR=`pwd` | ||
cd `dirname $0` | ||
cd ../lib | ||
LIB_DIR=`pwd` | ||
|
||
SERVER_NAME='com.weibo.motan.benchmark.MotanBenchmarkServer' | ||
|
||
PIDS=`ps -ef | grep java | grep "$LIB_DIR" | grep ${SERVER_NAME} | awk '{print $2}'` | ||
if [ -z "$PIDS" ]; then | ||
echo "stop failed, the $SERVER_NAME not start!" | ||
exit 1 | ||
fi | ||
|
||
for PID in ${PIDS}; | ||
do | ||
kill ${PID} > /dev/null 2>&1 | ||
done | ||
|
||
echo "stop success! pid:"${PIDS} | ||
cd ${DIR} |