From owner-freebsd-current@FreeBSD.ORG Mon Dec 6 07:15:47 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C410716A4CE; Mon, 6 Dec 2004 07:15:47 +0000 (GMT) Received: from pd3mo3so.prod.shaw.ca (shawidc-mo1.cg.shawcable.net [24.71.223.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id DA94543D5C; Mon, 6 Dec 2004 07:15:44 +0000 (GMT) (envelope-from colin.percival@wadham.ox.ac.uk) Received: from pd5mr7so.prod.shaw.ca (pd5mr7so-qfe3.prod.shaw.ca [10.0.141.183]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0I8A00E2FHH5O2F0@l-daemon>; Mon, 06 Dec 2004 00:15:05 -0700 (MST) Received: from pn2ml10so.prod.shaw.ca ([10.0.121.80]) by pd5mr7so.prod.shaw.ca (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0I8A003E5HH57540@pd5mr7so.prod.shaw.ca>; Mon, 06 Dec 2004 00:15:05 -0700 (MST) Received: from [192.168.0.60] (S0106006067227a4a.vc.shawcable.net [24.87.233.42])2003)) with ESMTP id <0I8A00G6PHH4Q2@l-daemon>; Mon, 06 Dec 2004 00:15:04 -0700 (MST) Date: Sun, 05 Dec 2004 23:15:04 -0800 From: Colin Percival In-reply-to: To: Jiawei Ye Message-id: <41B406F8.1000409@wadham.ox.ac.uk> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: 7bit X-Accept-Language: en-us, en X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime References: User-Agent: Mozilla Thunderbird 0.9 (X11/20041107) cc: freebsd-current@freebsd.org Subject: Re: sockstat weirdness X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Dec 2004 07:15:47 -0000 Jiawei Ye wrote: > leafy@chihiro:~$ sockstat > sockstat: sysctlbyname(): No such file or directory > > What have I missed here? You haven't missed anything, it's broken. In revision 1.11 of src/usr.bin/sockstat/sockstat.c code was added which uses the net.inet.divert.pcblist sysctl. Unfortunately, this might not exist, so sockstat(8) gets legitimately unhappy. I'd guess that the right solution would be to replace line 226 err(1, "sysctlbyname()"); with goto out; but I'm not sure; ru, could you tell me if this is correct and/or fix it yourself? Colin Percival