Dwight Johnson <[EMAIL PROTECTED]> writes:

> On 15 Oct 2000, Matthew Emmett wrote:
>  
> > When netscape screws up and dies, it sometimes leaves it's "dns
> > helper" process, which takes up memory/swap.  Does anyone know of
> > a way to clean up these old netscape processes, without killing
> > the netscape that is currently running?
> 
> Launch top. The dead netscape is often still running like a chicken
> with its head cut off and putting a dangerous load on the system.

Yeah, exactly.  How very annoying.

Okay, here's the situation: I'm configuring a machine that will act as
a public access internet machine -- basically it just runs netscape
and has some other nice software like xpdf etc etc.

Users of this machine are not familiar with GNU/Linux at all.  I want
to make a cron job that will run peridocially and clean up those
annoying netscape's that are bogging the system.  I haven't figured
out a recreatable way to get netscape to crash (any pointers on how to
do so would be appreciated), so I can't test out my idea, but here is
my idea so far:

$ ps -o pid,ppid,cmd | grep "dns helper"

tells me the pid and ppid of any "dns helper" netscape processes (and
grep, but I'll filter that out).  Next, I take all but the largest pid
and kill it.  This way, if the user's netscape died and they start a
new one right away, my script will only kill those dead-chicken
netscape's.  Does this sound like it will work reliably?

Thanks for your input,
Matt

Reply via email to