Getting process names from sockets

Vernon Schryver vjs at calcite.UUCP
Sun Jun 9 03:20:11 AEST 1991


In article <1991Jun7.184121.29105 at garfield.cs.mun.ca>, glenn8 at garfield.cs.mun.ca (Glenn Stowe) writes:
> We are running 386/ix with Berkley extensions (sockets, etc.) and would like
> to be able to determine, given an active socket number or PCB, what processes
> are connected by that socket. Fstat and Ofiles will do this on SunOS or Bsd
>but the facility desn't seem to be there for SysV. Does anybody have any ideas?

At least one workstation vendor shipping SVR3 with 4.3BSD-tahoe TCP/IP has
extended the SV fuser command for just this purpose.  A "path" of the form
'port/protocol' or 'hostname:port:protocol' which does specify a valid file
is understood to be a request to list processes with the sockets connected
to the specified port.  'Port' must be an integer constant, and 'protocol'
must be either TCP or UDP.  'Hostname' must be a IP number or hostname, and
is used to specify individual connections.


Vernon Schryver,   vjs at calcite.uucp



More information about the Comp.unix.sysv386 mailing list