Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 08 Nov 2012 16:57:28 -0600
From:      Larry Rosenman <ler@lerctr.org>
To:        Greg 'groggy' Lehey <grog@freebsd.org>
Cc:        freebsd-current@freebsd.org, Edward Tomasz Napiera??a <trasz@freebsd.org>, Andriy Gapon <avg@freebsd.org>
Subject:   Re: sysutils/lsof Author Question (for CLANG)....
Message-ID:  <28daf355adf14034cb8e9eb87eef60d5@webmail.lerctr.org>
In-Reply-To: <20121108224103.GJ77848@eureka.lemis.com>
References:  <5d4c4abe37bd6fffd0c206c1b7b68ce1@webmail.lerctr.org> <alpine.GSO.1.10.1211071030050.2164@multics.mit.edu> <20121107213917.GD77848@eureka.lemis.com> <cdfb43c5a36fbb113194a9a381a1000b@webmail.lerctr.org> <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>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?28daf355adf14034cb8e9eb87eef60d5>