From owner-freebsd-stable Tue Nov 7 15:17:52 2000 Delivered-To: freebsd-stable@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id CAE1E37B479 for ; Tue, 7 Nov 2000 15:17:47 -0800 (PST) Received: (from des@localhost) by flood.ping.uio.no (8.9.3/8.9.3) id AAA52961; Wed, 8 Nov 2000 00:17:43 +0100 (CET) (envelope-from des@ofug.org) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: Andrew Gallatin Cc: John Polstra , stable@FreeBSD.ORG Subject: Re: Is sockstat broken in -stable? References: <14856.28717.596196.163734@grasshopper.cs.duke.edu> From: Dag-Erling Smorgrav Date: 08 Nov 2000 00:17:40 +0100 In-Reply-To: Andrew Gallatin's message of "Tue, 7 Nov 2000 17:26:16 -0500 (EST)" Message-ID: Lines: 26 User-Agent: Gnus/5.0802 (Gnus v5.8.2) Emacs/20.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Andrew Gallatin writes: > Changing the width of the netstat match to 16 helps a little, but > because of the fstat problem, its not enough. This could probably > be patched up by stream-editing netstat's output so as to chop off the > high 8 fields of addresses coming from netstat. Dag? Dag-Erling, please (or DES if you're lazy) This is indeed a 64-bit issue, and the "correct" behaviour is not immediately obvious - some will say the correct behaviour is to print the complete pcb address, while others will insist on keeping the output shorter than 80 columns no matter what we have to truncate (at least, that's the reason I was given for truncating the port number in netstat output) One possible solution is to argue that since pcbs are in kernel space, and, since the kvm is smaller than 4GB, the last 32 bits of the pcb address are sufficient to uniquely identify the pcb, so the sockstat can strip everything except the leading 0x and the last eight hex digits before doing the comparison. The only caveat is that it's technically possible to increase the kvm size beyond 4GB, so this assumption might break one sunny day. DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message