Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!news.eng.convex.com!newshost.convex.com!newsgate.duke.edu!news.mathworks.com!newsfeed.internetmci.com!in2.uu.net!news.jersey.net!zeus.jersey.net!bherd From: bherd@zeus.jersey.net (Bil Herd) Newsgroups: comp.security.unix,comp.unix.admin,comp.unix.bsd.freebsd.misc Subject: Re: How to associate a socket w/ PID? (BSD solution) Followup-To: comp.security.unix,comp.unix.admin,comp.unix.bsd.freebsd.misc Date: 31 Jul 1996 02:01:20 GMT Organization: InterActive Network - Serving SNJ - SLIP/PPP/SHELL Lines: 31 Message-ID: <4tmepg$f7l@hermes.jersey.net> References: <4tk4mh$qpl@hermes.jersey.net> <4tkjg6$st@charm.il.ft.hse.nl> NNTP-Posting-Host: zeus.jersey.net X-Newsreader: TIN [version 1.2 PL2] Xref: euryale.cc.adfa.oz.au comp.security.unix:26646 comp.unix.admin:45528 comp.unix.bsd.freebsd.misc:24709 This is a cool program and does what I need. The lsof program didn't compile out of the box so I will need to look at that when time permits. Thanks to all who responded about this and the SMTP question. robert (robert@il.ft.hse.nl) wrote: : bherd@zeus.jersey.net (Bil Herd): : >How do you find out which process is associated with a network : >connection other than recognizing the port? : charm.il.ft.hse.nl:/pub/perl/nstat.pl : It's a perl-program I wrote a while back for my FreeBSD machine, but I : just checked and it also seems to work on BSDI. : It combines the outputs of fstat(8) and netstat(8), and produces something : like this: : -- : PID User Command Pro Local Address Foreign Address State : 29545 nobody httpd tcp 145.85.127.2.80 194.90.103.192.144 ESTABLISHED : ... : -- : It has some commandline-options which are useful, 'nstat.pl -?' shows : them. : robert -- Bil Herd InterActive Network Services