Date: Thu, 01 Feb 2007 09:33:37 -0800 From: Glenn Gillis <glenn@elaw.org> To: freebsd-questions@freebsd.org Subject: Re: Obtaining a pid or process owner from netstat? Message-ID: <45C22471.4040904@elaw.org> In-Reply-To: <45C14130.1040502@gmail.com> References: <45C1381F.7010308@elaw.org> <45C14130.1040502@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Karol Kwiatkowski wrote:
> Glenn Gillis wrote:
>> If 'netstat -anp tcp' shows me an IP address and port with a process
>> listening on it, can anyone suggest a way to determine either the pid or
>> the owner of the process that is bound to that address?
>>
>> In other words:
>>
>> % netstat -anp tcp | grep LISTEN
>> tcp4 0 0 64.112.226.133.8091 *.* LISTEN
>> tcp4 0 0 64.112.226.133.8090 *.* LISTEN
>> tcp4 0 0 *.8021 *.* LISTEN
>> tcp4 0 0 *.8080 *.* LISTEN
>> tcp4 0 0 64.112.226.141.8080 *.* LISTEN
>> tcp4 0 0 64.112.226.133.13080 *.* LISTEN
>>
>> I'm interested in what is listening on 64.112.226.141.8080, mainly
>> because I need something else to listen there. I know it's a Zope
>> instance, but I can't tell *which* Zope instance (there are many on this
>> box.)
>>
>> NB: This is on a 4.11-RELEASE-p26 box.
>
> Have a look at sockstat(1) and its options (like '-4' '-l' and '-p').
>
> HTH,
>
> Karol
Perfect, thanks!
--
Glenn
P.S. FWIW, the '-p' option does not appear to be valid under 4.11:
$ sockstat -p
Unknown option: p
Usage: sockstat [-46clu]
However, sockstat still gave me that I needed. Thx, G.
[-- Attachment #2 --]
0 *H
010 + 0 *H
%00V1ץc(%/7vZ0
*H
0b10 UZA1%0#U
Thawte Consulting (Pty) Ltd.1,0*U#Thawte Personal Freemail Issuing CA0
061108185040Z
071108185040Z0W10
UGillis10U*Glenn10UGlenn Gillis10 *H
glenn@elaw.org0"0
*H
0
/Eͺ J{n
.
RUE)P[1|ɣ\]^)1騙v/([u<xLv|:
?B8ҁX(U{/mYcɾN4Iq@Qw˯6/irPx.qv3ŗeR#z~!l]##,q%g=(Ya96\ƃU/ť:x
~땛S[Qcy# +0)0U0glenn@elaw.org0U0 0
*H
Rl0o^] _p>/ymoWW R|ޯҕMLp";ivv̺R~eX=G3i)݀n.{G 5$䦯9\Z1 e00V1ץc(%/7vZ0
*H
0b10 UZA1%0#U
Thawte Consulting (Pty) Ltd.1,0*U#Thawte Personal Freemail Issuing CA0
061108185040Z
071108185040Z0W10
UGillis10U*Glenn10UGlenn Gillis10 *H
glenn@elaw.org0"0
*H
0
/Eͺ J{n
.
RUE)P[1|ɣ\]^)1騙v/([u<xLv|:
?B8ҁX(U{/mYcɾN4Iq@Qw˯6/irPx.qv3ŗeR#z~!l]##,q%g=(Ya96\ƃU/ť:x
~땛S[Qcy# +0)0U0glenn@elaw.org0U0 0
*H
Rl0o^] _p>/ymoWW R|ޯҕMLp";ivv̺R~eX=G3i)݀n.{G 5$䦯9\Z1 e0?0
0
*H
010 UZA10UWestern Cape10U Cape Town10U
Thawte Consulting1(0&UCertification Services Division1$0"UThawte Personal Freemail CA1+0) *H
personal-freemail@thawte.com0
030717000000Z
130716235959Z0b10 UZA1%0#U
Thawte Consulting (Pty) Ltd.1,0*U#Thawte Personal Freemail Issuing CA00
*H
0 Ħ<UsUNʙZhup[v:aQP
0cZ,p+Z?qV˯<6$*+w=+>@dקe*TH<a@dr` 00U0 0CU<0:08642http://crl.thawte.com/ThawtePersonalFreemailCA.crl0U0)U"0 010UPrivateLabel2-1380
*H
HP.
fgCL!6-6/P p<ab:~ t%Pb'qW%ݩ9 Oe_N4[5MwV!x!5$F]_eO1d0`0v0b10 UZA1%0#U
Thawte Consulting (Pty) Ltd.1,0*U#Thawte Personal Freemail Issuing CA1ץc(%/7vZ0 + 0 *H
1 *H
0 *H
1
070201173337Z0# *H
1[.jZ"8N|C0R *H
1E0C0
*H
0*H
0
*H
@0+0
*H
(0 +71x0v0b10 UZA1%0#U
Thawte Consulting (Pty) Ltd.1,0*U#Thawte Personal Freemail Issuing CA1ץc(%/7vZ0*H
1xv0b10 UZA1%0#U
Thawte Consulting (Pty) Ltd.1,0*U#Thawte Personal Freemail Issuing CA1ץc(%/7vZ0
*H
28jVQ3M̫HVa?Cj>6.B'ifm(LK7~tXޝ4<sq>6ih]Mk/uőfGy6;]=.w[Rۀ?JJǤ\T*Sr_%aKlP6&Tȡ\2!CJ;Dǎ<L& LjZ5a{i oLkGUEr
P]z9bb> LhҖ}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45C22471.4040904>
