Kill brutefir

Pt ca brutefir ramane “agatat”, mpd-ul se blocheaza.

Cheap and dirty trick:

1. script pt kill zombie process (nu imi aduc aminte de unde l-am luat)

ps -eo pid,ppid,state,user,comm | awk 'BEGIN { count=0 } $3 ~ /Z/ { count++; system ("kill -9 " $2) } END { print "\n" count " Zombie(s) were slayed" }'

2. adaptat pt rc.local de aici https://coderwall.com/p/x0fqmw

#!/bin/bash
#This script run every 1 seconds

while (sleep 5 && ps -eo pid,ppid,state,user,comm | awk 'BEGIN { count=0 } $3 ~ /Z/ { count++; system ("kill -9 " $2) } END { }' ) &
do
        wait $!
done

3. adauga script in /etc/rc.local

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Post Navigation