[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: How to find and clear zombie processes w/o rebooting?

On 25Jun2008 18:33, Daniel B. Thurman <dant cdkkt com> wrote:
> Using F8, I have found that Nautilus sometimes hangs and
> runs at 100% CPU.  Force killing Nautilus's drive windows
> was the only way to recover.  I am not sure that force killing
> this drive window is related to the zombie that I founding using
> top.
> I also discovered that my swap was increased to 2GB of 4GB
> and has stayed there ever since.

Zombies are just process slots of exit()ed processes awaiting collection.
They do not consume CPU time or swap space.

> So before I accuse Nautilus as being the zombie process, how
> do I locate it using ps or some other tool to find out what is
> going on and to what process the zombie was?

Zombies are in the Z state. They are exited programs whose parents have
not called wait() to collect the exit status.

> In the same breadth, is there a way to clear zombie processes
> without being forced to reboot the system which would certainly
> remove the zombie process and clear the swap space?

Removing zombies will do NOTHING about your swap space, since they are
not consuming it. (Of course a reboot will clear the swap, as it does
everything else.)

They only way to clear a zombies process slot (which is all a zombie
process actually is) is to find the zombie's parent process (using ps'
"f" (forest) option, for example, or just looking at the PPID column)
and either causing the parent to do a wait() for the zombie if possible,
or to kill the parent (which will cause the zombies to be inherited by
process 1, which will then wait() for it, cleaning it up).

Zombies are essentially untidy but harmless. They are not eating you
machine's brains (ram/swap/cpu).

Cameron Simpson <cs zip com au> DoD#743

Zombies don't get pumped.       - Jake, in rec.climbing

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]