From owner-freebsd-stable Tue Nov 7 14:26:22 2000 Delivered-To: freebsd-stable@freebsd.org Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by hub.freebsd.org (Postfix) with ESMTP id DDE0F37B4C5; Tue, 7 Nov 2000 14:26:17 -0800 (PST) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.9.3/8.9.3) with ESMTP id RAA04336; Tue, 7 Nov 2000 17:26:17 -0500 (EST) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.11.1/8.9.1) id eA7MQHj13586; Tue, 7 Nov 2000 17:26:17 -0500 (EST) (envelope-from gallatin@cs.duke.edu) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Tue, 7 Nov 2000 17:26:16 -0500 (EST) To: John Polstra Cc: des@FreeBSD.ORG, stable@FreeBSD.ORG Subject: Re: Is sockstat broken in -stable? In-Reply-To: References: X-Mailer: VM 6.43 under 20.4 "Emerald" XEmacs Lucid Message-ID: <14856.28717.596196.163734@grasshopper.cs.duke.edu> Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG John Polstra writes: > On a -stable system from October 31, I'm seeing this from sockstat: > > alpha$ sockstat > USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS > root sshd 13195 5 ? ? ? <..> > Userland and kernel are in sync. This is on an Alpha, though I > don't know whether that's significant or not. Is anybody else > seeing this problem? This is alpha (aka 64-bit) specific. There are 2 problems. The first is that fstat is borked. It is casting addresses to ints and printing out 8 fields rather than 16: root sshd1 714 5* internet stream tcp 63e9200 ............................................................^^^^^^^^ The second is that this netstat is not borked. Its printing out all 16 fields of addresses on alpha: fffffe00063e9200 tcp4 0 20 thunder.ssh grasshopper.998 ESTABLISHED ........^^^^^^^^^^^^^^^^^ Between the 2, sockstat cannot match things up. Eg, 0xfffffe00063e9200 != 0x63e9200 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? It would be far better to fix fstat.. Cheers, Drew To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message