Date: Thu, 18 Sep 2003 08:39:45 +0000 From: Nathan Kinkade <nkinkade@fastmail.fm> To: dick hoogendijk <dick@nagual.st>, freebsd-questions@freebsd.org Subject: Re: netstat options Message-ID: <20030918083945.GA1466@npkfbsd> In-Reply-To: <20030918133658.GB1773@happy-idiot-talk.infracaninophile.co.uk> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030918083945.GA1466>