Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.hawaii.edu!news.uoregon.edu!news-res.gsl.net!news.gsl.net!news-dc.gsl.net!news.gsl.net!news.sprintlink.net!news-dc-10.sprintlink.net!EU.net!sun4nl!wirehub!newsgate.cistron.nl!news.ow.nl!patriot.nl!zoetermeer!rijnhaave.nl!news.unisource.nl!surfnet.nl!tuegate.tue.nl!news.win.tue.nl!il.ft.hse.nl!not-for-mail From: robert@il.ft.hse.nl (robert) Newsgroups: comp.security.unix,comp.unix.admin,comp.unix.bsd.freebsd.misc Subject: Re: How to associate a socket w/ PID? (BSD solution) Date: 30 Jul 1996 14:16:25 +0200 Organization: LSD...melts in your mind, not in your hand Lines: 12 Message-ID: <4tkuep$jc9@charm.il.ft.hse.nl> References: <4tk4mh$qpl@hermes.jersey.net> <4tkjg6$st@charm.il.ft.hse.nl> <4tklef$di1@verdi.nethelp.no> NNTP-Posting-Host: charm.il.ft.hse.nl Xref: euryale.cc.adfa.oz.au comp.security.unix:26623 comp.unix.admin:45483 comp.unix.bsd.freebsd.misc:24669 sthaug@nethelp.no (Steinar Haug): >[robert] >| It combines the outputs of fstat(8) and netstat(8)... >There is already a wonderful tool available to do this and much more - it's >called lsof. Available from your nearest FTP archie, check with archie. lsof is very cool (I use it alot myself), but it requires you to be root if you want to install it (because it needs to be sgid kmem). Now, fstat should be sgid kmem too, but it's a standard utility which comes shipped with FreeBSD/BSDI (and it already has the right permissions). robert