From owner-freebsd-hackers Mon Feb 11 4:12: 2 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from straylight.ringlet.net (discworld.nanolink.com [217.75.135.248]) by hub.freebsd.org (Postfix) with SMTP id 117EC37B47F for ; Mon, 11 Feb 2002 04:10:13 -0800 (PST) Received: (qmail 76416 invoked by uid 1000); 11 Feb 2002 12:10:47 -0000 Date: Mon, 11 Feb 2002 14:10:47 +0200 From: Peter Pentchev To: Varshavchick Alexander Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: lsof and listening processes on 4.5 Message-ID: <20020211141047.G355@straylight.oblivion.bg> Mail-Followup-To: Varshavchick Alexander , freebsd-hackers@FreeBSD.ORG References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="10jrOL3x2xqLmOsH" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from alex@metrocom.ru on Mon, Feb 11, 2002 at 03:00:20PM +0300 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --10jrOL3x2xqLmOsH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 11, 2002 at 03:00:20PM +0300, Varshavchick Alexander wrote: > Hi folks, >=20 > Is it normal that lsof utility doesn't display the process that are > listening specified TCP sockets any more? For example, here are the > examples of the lsof output of 'lsof -i|grep inetd' command on FreeBSD 4.3 > and 4.5: >=20 > 4.3: > inetd 157 root 4 IPv4 0xeee7f720 0t0 TCP *:ftp (LISTEN) > inetd 157 root 5 IPv4 0xeee7f500 0t0 TCP *:telnet (LIS= TEN) > inetd 157 root 6 IPv6 0xeee7f2e0 0t0 TCP *:telnet (LIS= TEN) >=20 > 4.5: > inetd 180 root 4 IPv4 0xeb159cc0 0t0 TCP *:* > inetd 180 root 5 IPv4 0xeb15adc0 0t0 TCP *:5611->*:= 49308 > inetd 180 root 6 IPv4 0xeb15aba0 0t0 TCP *:5611->*:= 49325 >=20 > How can it be that it doesn't show the ports on which inetd is > listening? How can this info be retrieved on 4.5 at all, are there some > other ways for doing it? You could use sockstat(1), a FreeBSD base system Perl script which parses the output of fstat(1) and netstat(1). Try sockstat -4, then try sockstat -4l (lowercase ell). As to lsof, I'm having the same problem here, I'll look into it later. G'luck, Peter --=20 Peter Pentchev roam@ringlet.net roam@FreeBSD.org PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 You have, of course, just begun reading the sentence that you have just fin= ished reading. --10jrOL3x2xqLmOsH Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjxntMcACgkQ7Ri2jRYZRVO8kwCePilreE7qR31tvrR5B1rKq7dZ kEwAoKO+KgukWtvc15QufPV8WRUspUMD =LfNb -----END PGP SIGNATURE----- --10jrOL3x2xqLmOsH-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message