From owner-freebsd-questions@FreeBSD.ORG Thu Feb 1 01:24:17 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 00DF016A403 for ; Thu, 1 Feb 2007 01:24:17 +0000 (UTC) (envelope-from karol.kwiat@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.175]) by mx1.freebsd.org (Postfix) with ESMTP id 8B48C13C441 for ; Thu, 1 Feb 2007 01:24:14 +0000 (UTC) (envelope-from karol.kwiat@gmail.com) Received: by ug-out-1314.google.com with SMTP id o2so331721uge for ; Wed, 31 Jan 2007 17:24:13 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:reply-to:user-agent:mime-version:to:cc:subject:references:in-reply-to:x-enigmail-version:openpgp:content-type; b=Frfupqu9MDNVCpoakeFBYC6NvUoP2rZa54O0QbawfjHuc0aDQ4HvMcjmmskxUO/PSm8ujlPO55QIYj4lmFbccn9n6rSbkpEoqoiZd8jFRG4j49eYjX34kR0lnuuCQAEgkvixWbPGQNDEpwrBqwyZ4VAV5hJ1rcsnnljv0+dCRQs= Received: by 10.67.26.7 with SMTP id d7mr1910089ugj.1170293053009; Wed, 31 Jan 2007 17:24:13 -0800 (PST) Received: from blackacidevil.orchid.homeunix.org ( [83.27.11.214]) by mx.google.com with ESMTP id o30sm2252950ugd.2007.01.31.17.24.11; Wed, 31 Jan 2007 17:24:12 -0800 (PST) Message-ID: <45C14130.1040502@gmail.com> Date: Thu, 01 Feb 2007 02:24:00 +0100 From: Karol Kwiatkowski User-Agent: Thunderbird 2.0b2 (X11/20070130) MIME-Version: 1.0 To: Glenn Gillis References: <45C1381F.7010308@elaw.org> In-Reply-To: <45C1381F.7010308@elaw.org> X-Enigmail-Version: 0.94.2.0 OpenPGP: id=06E09309; url=http://www.orchid.homeunix.org/carlos/gpg/0x06E09309.asc Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigDEBCE1911F4692CA54A300DE" Cc: freebsd-questions@freebsd.org Subject: Re: Obtaining a pid or process owner from netstat? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: karol.kwiat@gmail.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Feb 2007 01:24:17 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigDEBCE1911F4692CA54A300DE Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 o= r > the owner of the process that is bound to that address? >=20 > In other words: >=20 > % netstat -anp tcp | grep LISTEN > tcp4 0 0 64.112.226.133.8091 *.* LISTE= N > tcp4 0 0 64.112.226.133.8090 *.* LISTE= N > tcp4 0 0 *.8021 *.* LISTE= N > tcp4 0 0 *.8080 *.* LISTE= N > tcp4 0 0 64.112.226.141.8080 *.* LISTE= N > tcp4 0 0 64.112.226.133.13080 *.* LISTE= N >=20 > 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 thi= s > box.) >=20 > 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 --=20 Karol Kwiatkowski OpenPGP 0x06E09309 --------------enigDEBCE1911F4692CA54A300DE Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----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----- --------------enigDEBCE1911F4692CA54A300DE--