标签:one -- kill -9 mon 进程 $0 for gre grep
现在挖矿程序攻击非常多,将挖矿程序关闭后,守护进程仍然会重启。守护进程总是反复重启,进程ID总是反复跳动
#NAME=$1
NAME=‘mongod -f rs0/m‘
echo $NAME
ID=`ps -ef | grep "$NAME" | grep -v "$0" | grep -v "grep" | awk ‘{print $2}‘`
echo $ID
echo "---------------"
for id in $ID
do
kill -9 $id
echo "killed $id"
#echo "killed id"
done
echo "---------------"
标签:one -- kill -9 mon 进程 $0 for gre grep
原文地址:https://www.cnblogs.com/wujinhong/p/12658774.html