Killing processes by name

トップ ページ
添付ファイル:
Eメールのメッセージ
+ (text/plain)
このメッセージを削除
このメッセージに返信
著者: John (EBo) David
日付:  
題目: Killing processes by name
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 --