#!/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
linux 执行远程命令
原创
©著作权归作者所有:来自51CTO博客作者咔咔是咖咖的原创作品,请联系作者获取转载授权,否则将追究法律责任
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
Windwos远程执行Linux命令
远程执行的基础就是需要执行命令的2台机器可以进行通信,而通常通信的
linux 文件传输工具 ssh windows socket -
expect - linux远程执行命令
expect - linux远程执行命令
Linux expect