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

Charlie Brady <[email protected]>
Newsgroups gmane.comp.misc.pape.general
Message-ID <Pine.LNX.4.44.0403261233530.29753-100000@e-smith.charlieb.ott.istop.com>
On Fri, 26 Mar 2004, Payal Rathod wrote:

> > Better to remove it from the xinetd configuration. Better again to remove 
> > it completely. Use ssh instead.
> 
> I kept it under xinetd after long use with tcpserver because with
> tcpserver it used to crash many times and often hang up.

My experience is that tcpserver never crashes. It may be unable to start 
(for example, because some other application has the port that it needs, 
as was your problem yesterday) but it never crashes.

> Never got the real cause for that. Also, I wasn't able to start logging
> services to find the real cause.

You can always use strace to find the real cause. If you are starting
tcpserver via supervise, then find the process id of the supervise
process. Then connect strace to that process (-p nnn), using the -f flag
to follow child processes when it forks. You will then see the sequence of
system calls as supervise forks, then executes the run script, then
executes tcpserver, which then (if all goes well) will wait for
connections then spawn the child process. You can tell strace to write the
results of its spying to file. Use ^C to interrupt strace once tcpserver
has "crashed". Someone here will likely help you interpret the strace file
if you can't sport the error.

Logging is not hard to set up, once you understand the concept. Or just
carefully follow Dan Bernstein's instructions - they are 100% accurate.

> About ssh, well I use telnet only for local network. Telnet access from
> outside is blocked. This is because not every windows machine has a ssh
> client installed on it

SSH clients for Windows are easy to find and easy to install. And provide 
better terminal emulation than windows telnet does.

> and users find it easy to just type telnet server
> and run basic commmands from there.

They will find ssh just as easy as telnet once they accept the change.

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