From owner-freebsd-current@FreeBSD.ORG Thu Nov 8 22:57:30 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 87EB1DB4; Thu, 8 Nov 2012 22:57:30 +0000 (UTC) (envelope-from ler@lerctr.org) Received: from thebighonker.lerctr.org (lrosenman-1-pt.tunnel.tserv8.dal1.ipv6.he.net [IPv6:2001:470:1f0e:3ad::2]) by mx1.freebsd.org (Postfix) with ESMTP id 353628FC13; Thu, 8 Nov 2012 22:57:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lerctr.org; s=lerami; h=Message-ID:References:In-Reply-To:Subject:Cc:To:From:Date:Content-Transfer-Encoding:Content-Type:MIME-Version; bh=MapMhS7G65sad2akSBkuiXboob3d3AZjIwkcE+qEMG8=; b=TAoRzW7s2XUYN3bJsyIVoG7v/aZBqouFAxLEmJnlZG7OyWSq1sAYTVil6uSr0K+UcS+7zLxRx2KRrnRCzN6Jhmy0bua/qTITae2uIHqbwkjbiv7E7n0IJ2ch1d/QcHPLMyK8qBfbgg2uN/aLVEjvPpmKrMWxyo9DUAqZD9+c6v0=; Received: from localhost.lerctr.org ([127.0.0.1]:61745 helo=webmail.lerctr.org) by thebighonker.lerctr.org with esmtpa (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1TWb2O-00010B-NW; Thu, 08 Nov 2012 16:57:29 -0600 Received: from [32.97.110.60] by webmail.lerctr.org with HTTP (HTTP/1.1 POST); Thu, 08 Nov 2012 16:57:28 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 08 Nov 2012 16:57:28 -0600 From: Larry Rosenman To: Greg 'groggy' Lehey Subject: Re: sysutils/lsof Author Question (for CLANG).... In-Reply-To: <20121108224103.GJ77848@eureka.lemis.com> References: <5d4c4abe37bd6fffd0c206c1b7b68ce1@webmail.lerctr.org> <20121107213917.GD77848@eureka.lemis.com> <20121107230034.GF77848@eureka.lemis.com> <509BBEDC.4070103@FreeBSD.org> <7662C646-941D-4E94-92C3-444752DF1EF7@FreeBSD.org> <6aadce9c231079e0738de9f059625358@webmail.lerctr.org> <20121108224103.GJ77848@eureka.lemis.com> Message-ID: <28daf355adf14034cb8e9eb87eef60d5@webmail.lerctr.org> X-Sender: ler@lerctr.org User-Agent: Roundcube Webmail/0.8.2 X-Spam-Score: -3.3 (---) X-LERCTR-Spam-Score: -3.3 (---) X-Spam-Report: SpamScore (-3.3/5.0) ALL_TRUSTED=-1, BAYES_00=-1.9, RP_MATCHES_RCVD=-0.369 X-LERCTR-Spam-Report: SpamScore (-3.3/5.0) ALL_TRUSTED=-1, BAYES_00=-1.9, RP_MATCHES_RCVD=-0.369 Cc: freebsd-current@freebsd.org, Edward Tomasz Napiera??a , Andriy Gapon X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 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: Thu, 08 Nov 2012 22:57:30 -0000 On 2012-11-08 16:41, Greg 'groggy' Lehey wrote: > [Text formatting recovered] > > On Thursday, 8 November 2012 at 9:23:11 -0600, Larry Rosenman > wrote: >> On 2012-11-08 09:20, Edward Tomasz Napiera??a wrote: >>> Wiadomo???? napisana przez Andriy Gapon w dniu 8 lis 2012, o godz. >>> 15:17: >>>> Just curious why lsof can't use interfaces that e.g. >>>> fstat/sockstat/etc use? Those base utilities do not seem to >>>> experience as much trouble as lsof. >>> >>> Note that fstat(8) does not report file paths. On the other hand, >>> procstat(8) does. It looks like "procstat -fa" and "procstat -va" >>> together provide the same information lsof(8) does; unfortunately >>> there doesn't seem to be a way to show a "merged" output for files >>> opened (-f) and files mmapped, but closed (-v). > > Hmm. I don't know the details, but potentially there *would* be a > more kosher way of doing what lsof wants. > >> Remember also that lsof is portable between MANY flavors of *nix. > > Only because the author goes to a lot of effort to make it so. > There's special-case code for most kernels. In the case of FreeBSD, > it would make sense to use documented interfaces where possible, and > create them where they don't exist. And if we could get such a list and create them, Vic would use them I suspect. We've tried before and it turns into a bikeshed. > > Greg > -- > Sent from my desktop computer. > Finger grog@FreeBSD.org for PGP public key. > See complete headers for address and phone numbers. > This message is digitally signed. If your Microsoft MUA reports > problems, please read http://tinyurl.com/broken-mua