[comp.sys.sgi] How to find the local part of a network connection ?

almesber@nessie.cs.id.ethz.ch (Werner Almesberger) (05/06/91)

Is there a way to find out which process is the local part of a certain
tcp connection ?  Right now I'm tracing a problem where a yet unidentified
program leaves "zombie" links (they stay in CLOSE_WAIT and don't go away)
and find myself once again wondering why such a tool is missing ...

I've looked at several variants of the 'ofiles' program without finding
something that seems to be appropriate for IRIX 3.3. Has anyone ported it
or written something comparable ?

I've already tried to write a program that scans all processes for open
sockets myself, but I can't figure out how I can get the file table entries
when I have a process' u area. At least the content of u_ofile doesn't look
like a pointer ...

Any help would be greatly appreciated.

- Werner

-- 
--------------------------------------------------------------------------
| Werner Almesberger, ETH Zuerich, CH      almesber@nessie.cs.id.ethz.ch |
| BITNET: ALMESBER@CZHETH5A  HEPNET/CHADNET: [20579::]57414::ALMESBERGER |
--------------------------------------------------------------------------

vjs@rhyolite.wpd.sgi.com (Vernon Schryver) (05/07/91)

/etc/fuser does the jobe in the next release.  Unfortunately, that is
cold comfort now.



Vernon Schryver,   vjs@sgi.com

brendan@illyria.wpd.sgi.com (Brendan Eich) (05/07/91)

In article <1991May6.164005.10527@bernina.ethz.ch>, almesber@nessie.cs.id.ethz.ch (Werner Almesberger) writes:
> Is there a way to find out which process is the local part of a certain
> tcp connection ?  Right now I'm tracing a problem where a yet unidentified
> program leaves "zombie" links (they stay in CLOSE_WAIT and don't go away)
> and find myself once again wondering why such a tool is missing ...

If you have 3.3.2, try 'fuser 1023/tcp', e.g.  I extended fuser to find
processes using TCP and UDP ports.  The complete enhancement and man page
changes appear in the forthcoming 4.0 release.

/be