Killing processes by name
John (EBo) David
plug-discuss@lists.PLUG.phoenix.az.us
Wed, 14 Nov 2001 22:59:02 -0700
Carl Parrish wrote:
>
> Okay is there any way to kill a process by name? Since I've update to RH
> 7.2 I been noticing that I had problems with mozilla or other apps.
> Today I finally thought to check for java_vm processes. there are
> *hundres* of them they aren't dying I don't know if that's just because
> I have so much memory the garbage collector simply isn't clearing them
> or what but I want them dead and I don't wont to have to type in ever
> process number. is there a way I can just say kill all java_vm processes?
well, I would first start with "ps -a | grep java" then send that output
through a simple awk script to extract the PID's and feed those to "kill
$PID". It has been a littlewhile since I had to write one of these and
would take me more time than I have at his very moment, but there is a
pointer ;-)
A good place to look at scripts used in /etc/rc.* (or on SuSE
/etc/init.d).
Hope this helps.
EBo --