#!/bin/bash

base=/home/mc
ps aux | grep message | grep -v grep | awk '{print $2}' | xargs kill -9
echo "mc stop!"

#停止slaves
cat $base/config/slaves | while read line
do

ssh root@$line  > /dev/null 2>&1  << beginremote
ps aux | grep person | grep -v grep | awk '{print $2}' | xargs kill -9     
beginremote
echo "$line pr stop!"
done