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

Charlie Brady <[email protected]>
Newsgroups gmane.comp.misc.pape.general
Message-ID <Pine.LNX.4.44.0403251041320.15450-100000@e-smith.charlieb.ott.istop.com>
On 25 Mar 2004, Toby Betts wrote:

> > I think you have something that runs tcpserver and restart it when it dies
> > (daemontools ?). So it's always restarted when it dies.
> 
> If it is the case that tcpserver is being started improperly, leaving a 
> zombie process,..

Yes, such zombie processes are typical signs of a run script dying.

> and then being restarted by daemontools, identifying 
> which service is doing so should only be a matter of running "svstat 
> /service*" and seeing which service is up for 0 or 1 seconds.

Try "ps fax". Depending on platform, you may see a process tree, and can
see the ancestors of the zombie process. If one is "supervise
/service/foo", you know that /service/foo/run is where your problem is.  
Try running it from the command line, from within the service directory,
with an appropriately clean environment. Use strace if the failure mode is 
not obvious.

---
Charlie
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.