From owner-freebsd-current@FreeBSD.ORG Thu Nov 8 22:41:15 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 063DF413; Thu, 8 Nov 2012 22:41:15 +0000 (UTC) (envelope-from grog@lemis.com) Received: from w3.lemis.com (w3.lemis.com [208.86.224.149]) by mx1.freebsd.org (Postfix) with ESMTP id BF3E78FC0A; Thu, 8 Nov 2012 22:41:14 +0000 (UTC) Received: from eureka.lemis.com (1032.x.rootbsd.net [208.86.224.149]) by w3.lemis.com (Postfix) with ESMTP id A3E6C3B751; Thu, 8 Nov 2012 22:41:07 +0000 (UTC) Received: by eureka.lemis.com (Postfix, from userid 1004) id DD112F74EB; Fri, 9 Nov 2012 09:41:03 +1100 (EST) Date: Fri, 9 Nov 2012 09:41:03 +1100 From: Greg 'groggy' Lehey To: Larry Rosenman Subject: Re: sysutils/lsof Author Question (for CLANG).... Message-ID: <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> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HcccYpVZDxQ8hzPO" Content-Disposition: inline In-Reply-To: <6aadce9c231079e0738de9f059625358@webmail.lerctr.org> User-Agent: Mutt/1.4.2.3i Organization: The FreeBSD Project Phone: +61-3-5346-1370 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 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:41:15 -0000 --HcccYpVZDxQ8hzPO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline [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. 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 --HcccYpVZDxQ8hzPO Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlCcNP8ACgkQIubykFB6QiOk2ACeM7SoqH7QtVe+GYrtrs9wq2iQ ojcAmwXIwJVjHEiOdeVDg7gLQUS+2okA =VvIv -----END PGP SIGNATURE----- --HcccYpVZDxQ8hzPO--