You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
437 B
Bash
19 lines
437 B
Bash
#!/bin/sh
|
|
|
|
echo "Prepare to kill benchmark process"
|
|
|
|
pid=`ps ax | grep -i 'com.alipay.sofa.jraft.benchmark.BenchmarkBootstrap' | grep java | awk '{print $1}'`
|
|
if [ ! -n "$pid" ] ; then
|
|
echo "$LOG_PREFIX no java process running"
|
|
else
|
|
kill $pid
|
|
echo $LOG_PREFIX kill $pid
|
|
fi
|
|
|
|
if [ ! -n "$pid" ] ; then
|
|
echo "$LOG_PREFIX kill successfully"
|
|
else
|
|
kill -9 $pid
|
|
sleep 1
|
|
echo "$LOG_PREFIX kill process $pid successfully"
|
|
fi |