Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!mailrus!usenet.ins.cwru.edu!tut.cis.ohio-state.edu!husc6!cmcl2!kramden.acf.nyu.edu!brnstnd From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein) Newsgroups: comp.unix.wizards Subject: Re: Mapping inet connections to pids Message-ID: <3043:Aug1914:10:5390@kramden.acf.nyu.edu> Date: 19 Aug 90 14:10:53 GMT References: <1990Aug3.225954.25180@indetech.com> Sender: brnstnd@kramden.acf.nyu.edu (Dan Bernstein) Distribution: usa Organization: IR Lines: 16 In article <1990Aug3.225954.25180@indetech.com> cse@indetech.com (Scott Ellard) writes: > Is there a UNIX command that relates active internet > connections to the pids which own those connections? Not portably; there are no system calls to retrieve such information, even if it is stored. What do you need the pids for? > If there is no such command/option, has anyone written > a program to do this that they might share? My auth package (c.s.unix volume 22) records the uid and pid that started any authenticated connection; the uid is available through the network as per RFC 931, and you can easily modify the daemon to spit out the pid. ---Dan