Re: [semi-OT]: finding process which is defunct

MagicalTux <[email protected]>
Newsgroups gmane.comp.misc.pape.general
Message-ID <[email protected]>
Selon Brian Reichert <[email protected]>:
> On Wed, Mar 24, 2004 at 07:35:37PM +0000, Payal Rathod wrote:
> > Hi,
> > Just looking at ps waux I found a process which was defunct. How do I
> > know which program is being run?
> > 
> > The ps output show,
> > root      3033  0.0  0.0     0    0 ?        Z    00:55   0:00
> > [tcpserver] <defunct>
> > 
> > Also, the pid keeps on changing.
> > 
> > Can someone help on this?
> 

Zombie processes don't change PID, so it looks like it's not the same
everytime...

I think you have something that runs tcpserver and restart it when it dies
(daemontools ?). So it's always restarted when it dies. When you do your ps you
see the state when the process has just died. The zombie will be cleaned a bit
later by your re-launch app.
You may try a ps auxf if you're under linux. It will display an "arborecense" of
running process, so you will see the parent process.

Example with daemontools :
root      9856  0.0  0.0  1360   68 ?        S     2003   0:00  \_ supervise
qmail-smtpd
qmaild   11117  0.0  0.0  1432  100 ?        S     2003   1:13  |   \_
/usr/local/bin/tcpserver -v -R -l 0 -x /home/vpopmail/etc/tcp.smtp.cdb -c 20 -u
506 -g 505 0 smtp /var/qmail/bin/qmail-smtpd

You see that this process is runned by "supervise qmail-smtpd" (but it's not
zombie :p )


MagicalTux

-- 
FF.ST NetworK
IRC Services and more
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.