How to remove DEFUNCT processes with a command

How to remove DEFUNCT processes with a command

Post by R M » Fri, 13 Apr 2001 02:26:18



This may or may not be a stupid question:

How do I remove orphaned or defunct processes from my process list under

AIX 4.3.3.0? The command
chdev -l sys0 -a maxuproc='256'
seemed to clear out defunct processess. This makes me think there might
be some C call or something that clears out defunct processes without
having to reboot.the system.

Any help you could provide will be greatly appreciated.

  rok.vcf
< 1K Download
 
 
 

How to remove DEFUNCT processes with a command

Post by Greg Wimpe » Fri, 13 Apr 2001 03:23:55



Quote:> This may or may not be a stupid question:

> How do I remove orphaned or defunct processes from my process list under

> AIX 4.3.3.0? The command
> chdev -l sys0 -a maxuproc='256'

This comand is just resetting the maximum number of user processes
allowed on the system.  Perhaps the process table is rebuilt when you
do this, and the defunct processes are removed.  This would have to be
classified as a side effect, I think.  I doubt there is a system call
to remove defunct processes.  The system keeps them around for a
reason: to provide a return code to the parent process when it issues
the wait() system call.

Quote:> seemed to clear out defunct processess. This makes me think there might
> be some C call or something that clears out defunct processes without
> having to reboot.the system.

> Any help you could provide will be greatly appreciated.

I think what you need to know is the identity of the process(es)
leaving behind the defuncts.  Are there many of them?  One or two is
nothing to worry about, but if you have 10s or 100s, then maybe you
need to look into it.  Defunct (aka zombie) processes use no resources
other than a slot in the process table.

What is the parent process ID (PPID) of the defuncts?  If it is '1',
then you need to figure out why the 'init' process is not reaping
orphaned processes like it's supposed to.  Problems with init are often caused by an invalid or incorrect /etc/inittab file.  

If the PPID is something other than 1, you need to figure out why the
process is creating children but not calling wait() (or an equivalent)
to capture the return code of the child and free up the process table
slot.  If it's third party software, then I would complain loudly to
the vendor.  If it's in-house software, go down the hall and yell at
the programmer (unless it's your own code, of course ;).

--
Greg Wimpey


 
 
 

1. Is it possible to remove defunct processes?

On some unixes is it possible to remove defunct processes? Do
some unixes never have defunct processes?

There's a machine that's been running for 109 days 43 mins literally
and at least 20 users who run over 200 processes, but there are no
defunct processes running. There's another machine that runs a
different version of unix that has over 40 users typically and needs
to be rebooted every once in a while because of the defunct processes
that pile up.

--
        Henry Choy                       "Math class is hard" - Barbie


2. Old Satire on VMS

3. SunOS: wait3() doesn't remove defunct processes

4. (no subject)

5. Removing "defunct" processes in solaris 5.5.1

6. Where is KDE2's kpanelrc

7. Killing/removing defunct processes?

8. Problems with PPP: LCP ProtRej

9. Why <defunct> process after leaving a fork()ed process?

10. Tee hangs if earlier process in pipeline creates defunct child process.

11. Need to find vi command to remove ^H from command man find > find.txt

12. <defunct> processes from a server

13. Defunct processes in Net Application