From owner-freebsd-questions@FreeBSD.ORG Thu Sep 18 08:15:10 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7BF6116A4B3 for ; Thu, 18 Sep 2003 08:15:10 -0700 (PDT) Received: from mail.messagingengine.com (out2.smtp.messagingengine.com [66.111.4.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 605E143F3F for ; Thu, 18 Sep 2003 08:15:09 -0700 (PDT) (envelope-from nkinkade@[206.26.199.146]) Received: from mail.messagingengine.com (localhost [127.0.0.1]) by localhost.localdomain (Postfix) with ESMTP id A0BBA1DD947; Thu, 18 Sep 2003 11:15:07 -0400 (EDT) Received: from 10.202.2.150 ([10.202.2.150] helo=mail.messagingengine.com) by messagingengine.com with SMTP; Thu, 18 Sep 2003 11:15:07 -0400 X-Epoch: 1063898107 X-Sasl-enc: cnVqm1NySFcLQ+/K8jZ8Ww Received: from [206.26.199.146] (unknown [206.26.199.146]) by www.fastmail.fm (Postfix) with ESMTP id 6A1B81E42B7; Thu, 18 Sep 2003 11:14:50 -0400 (EDT) Received: from nkinkade by [206.26.199.146] with local (Exim 4.12) id 19zuKH-00019D-00; Thu, 18 Sep 2003 08:39:45 +0000 Date: Thu, 18 Sep 2003 08:39:45 +0000 From: Nathan Kinkade To: dick hoogendijk , freebsd-questions@freebsd.org Message-ID: <20030918083945.GA1466@npkfbsd> Mail-Followup-To: dick hoogendijk , freebsd-questions@freebsd.org References: <20030918110109.GA32359@lothlorien.nagual.st> <5.2.0.9.2.20030918070931.021d21b0@mail.sri-software.com> <20030918152429.5bea7d52.dick@nagual.st> <20030918133658.GB1773@happy-idiot-talk.infracaninophile.co.uk> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9jxsPFA5p3P2qPhR" Content-Disposition: inline In-Reply-To: <20030918133658.GB1773@happy-idiot-talk.infracaninophile.co.uk> User-Agent: Mutt/1.4.1i Sender: Nathan Kinkade Subject: Re: netstat options X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Nathan Kinkade List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Sep 2003 15:15:10 -0000 --9jxsPFA5p3P2qPhR Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 18, 2003 at 02:36:58PM +0100, Matthew Seaman wrote: > On Thu, Sep 18, 2003 at 03:24:29PM +0200, dick hoogendijk wrote: > > > At 01:01 PM 9/18/2003 +0200, you wrote: >=20 > > > >Active Internet connections (servers and established) > > > >Proto Recv-Q Send-Q Local Address Foreign Address State > > > >tcp 0 0 0.0.0.0:32768 0.0.0.0:* LISTEN > > > >tcp 0 0 0.0.0.0:32769 0.0.0.0:* LISTEN > > > >tcp 0 0 0.0.0.0:993 0.0.0.0:* LISTEN > > > >tcp 0 0 0.0.0.0:515 0.0.0.0:* LISTEN > > > >tcp 0 0 0.0.0.0:995 0.0.0.0:* LISTEN > > > >tcp 0 0 0.0.0.0:37 0.0.0.0:* LISTEN >=20 > > What I wanted to know is the equivalent for the LINUX "netstat -atun" > > which gives the output above (on the LINUX server). I want to test my > > FreeBSD machine the same way but "netstat -atun" gives me an output I > > don't want (on fbsd). >=20 > If all you want are the tcp sockets, then >=20 > % netstat -an -p tcp >=20 > otherwise:=20 >=20 > % netstat -an -f inet >=20 > will give you all of the network sockets, but not the unix domain > sockets. >=20 > Cheers, >=20 > Matthew If you are simply interested in tcp ports with listening sockets you might try using sockstat(1). $ sockstat -l4 =2E.. should show you all listening IPv4 sockets. Nathan --=20 gpg --keyserver pgp.mit.edu --recv-keys D8527E49 --9jxsPFA5p3P2qPhR Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE/aW9QO0ZIEthSfkkRAuZKAKCZbdQtNZchaM/pCafJaYm0sRpOUQCdFWRi 4lM4OeQIadv8TDkTrgOQK8E= =40ou -----END PGP SIGNATURE----- --9jxsPFA5p3P2qPhR--