现在挖矿程序攻击非常多,将挖矿程序关闭后,守护进程仍然会重启。守护进程总是反复重启,进程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 "---------------"
原文:https://www.cnblogs.com/wujinhong/p/12658774.html