Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 01 Feb 2007 02:24:00 +0100
From:      Karol Kwiatkowski <karol.kwiat@gmail.com>
To:        Glenn Gillis <glenn@elaw.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Obtaining a pid or process owner from netstat?
Message-ID:  <45C14130.1040502@gmail.com>
In-Reply-To: <45C1381F.7010308@elaw.org>
References:  <45C1381F.7010308@elaw.org>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
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

-- 
Karol Kwiatkowski   <karol.kwiat at gmail dot com>
OpenPGP 0x06E09309


[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFwUE5ezeoPAwGIYsRCMNLAJ9dYXrJQFSfZjj+ecqsz7EFZ1jbKwCfc98+
euR3jbtbBWopEGNC/kJ9Tf4=
=5+gZ
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45C14130.1040502>