Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!cs.utexas.edu!uwm.edu!uakari.primate.wisc.edu!aplcen!haven!purdue!mentor.cc.purdue.edu!mace.cc.purdue.edu!abe From: abe@mace.cc.purdue.edu (Vic Abell) Newsgroups: comp.protocols.tcp-ip Subject: Re: getting processid from netstat Summary: ofiles Keywords: processid, netstat Message-ID: <3731@mace.cc.purdue.edu> Date: 18 Dec 89 15:01:12 GMT References: <2829@infmx.UUCP> Organization: Purdue University Lines: 15 In article <2829@infmx.UUCP>, barrym@infmx.UUCP (Barry Mednick) writes: > Given the output from netstat -A, can I relate one of the connections > to a processid? In particular, can I use the foreign address or the > Process Control Block address to derive the process id that is using > that connection? % netstat -aA | grep smtp 80f67d0c tcp 0 0 *.smtp *.* LISTEN % ofiles -n 80f67d0c file 8010309c of socket 80f67d8c of INPCB 80f6790c of PCB 80f67d0c USER PID TYPE FD CMD root 148 sock 5 sendmail Ofiles is available in volume 18 of comp.sources.unix, number 57.