Wednesday, June 4, 2008

Killing All processes at once

Yesterday we come across a situation where we have to kill all look-a-like processes at once, this is what we followed to get rid of it.
kill -9 `ps -ef : grep -i applmgr : grep -i 889 : grep -v grep : awk '{print $2}'`
ps -efw : grep -i applmgr : grep : grep -v grep : awk '{print "kill -9 "$2}'

Note: Kindly replace colon (:) with pipe sign
Happy Troubleshooting !!!

1 comment:

Vikram Das said...

Hi Sundeep,

You can also try this variation:

ps -ef |grep applmgr|grep -v grep |awk '{print $2}'|xargs kill -9

- Vikram