lundi 8 novembre 2010

linux : shell script killer les process fils

Voici un petit script permettant de killer un process et ses nombruex enfants, exemple le nodeManager de weblogic :

Pour info, le PID


#/bin/bash
#set -x

PIDS=`ps -edf | grep NodeManager | grep -v grep | grep -v STIME | grep 7667 | cut -c 10-14`

for PID in $PIDS
do
kill -9 $PID
done

Aucun commentaire:

Enregistrer un commentaire