Dealing with rogue spam scripts in perl running in system memory.

I have a few tools I use to deal with the scripts, first I want to see if there are any perl scripts running:

ps aux | grep .pl | grep -v grep

Then I can kill them:

kill `ps aux | grep .pl | grep -v grep | awk '{print $2}'`

Sometimes with the -9:

kill -9 `ps aux | grep .pl | grep -v grep | awk '{print $2}'`

and sometimes for a specific user, again, the -9 flag can be used here as well

kill `ps aux | grep user | grep -v grep | awk '{print $2}'`






Leave a Reply

Your email address will not be published. Required fields are marked *