From owner-freebsd-net Wed Sep 22 11:28:34 1999 Delivered-To: freebsd-net@freebsd.org Received: from rgate2.ricochet.net (rgate2.ricochet.net [204.179.143.3]) by hub.freebsd.org (Postfix) with ESMTP id 39C3F154A9 for ; Wed, 22 Sep 1999 11:28:26 -0700 (PDT) (envelope-from boshea@ricochet.net) Received: from beastie.localdomain (mg-20425426-10.ricochet.net [204.254.26.10]) by rgate2.ricochet.net (8.9.3/8.9.3) with ESMTP id NAA09748; Wed, 22 Sep 1999 13:28:22 -0500 (CDT) Received: (from brian@localhost) by beastie.localdomain (8.9.3/8.8.7) id LAA01574; Wed, 22 Sep 1999 11:34:44 -0700 (PDT) (envelope-from brian) Date: Wed, 22 Sep 1999 11:34:44 -0700 From: "Brian O'Shea" To: Pavol Adamec Cc: "'freebsd-net@freebsd.org'" Subject: Re: Q: process using TCP connection Message-ID: <19990922113444.B57569@beastie.localdomain> Mail-Followup-To: Pavol Adamec , "'freebsd-net@freebsd.org'" References: <01BF0519.8E8AB700.palo.adamec@tecton.sk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i In-Reply-To: <01BF0519.8E8AB700.palo.adamec@tecton.sk>; from Pavol Adamec on Wed, Sep 22, 1999 at 04:43:09PM +0200 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org There is a neat perl script called sockstat in FreeBSD 3.2-RELEASE that does what you are looking for. It doesn't seem to be in 3.1-RELEASE, but it should be possible to modify it to work on older releases. It just cross-references the output from the 'netstat -Aan -finet' and 'fstat' commands. I couldn't get it to work properly when I copied it onto a 3.1-RELEASE system, but I didn't devote too much time to the task. It doesn't look like the output fields or format for either command has changed, but the minor version of perl has (from 5.005_02 to 5.005_03). -brian On Wed, Sep 22, 1999 at 04:43:09PM +0200, Pavol Adamec wrote: > Sorry for the question, I think it's been already answered but I can't > find it the archive. > How can I find out which process is using a TCP connection? > > Thanks > Paul > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-net" in the body of the message > -- Brian O'Shea boshea@ricochet.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message