Date: Thu, 8 Nov 2012 16:20:05 +0100 From: =?iso-8859-2?Q?Edward_Tomasz_Napiera=B3a?= <trasz@FreeBSD.org> To: Andriy Gapon <avg@freebsd.org> Cc: Greg 'groggy' Lehey <grog@FreeBSD.org>, freebsd-current@FreeBSD.org, Larry Rosenman <ler@lerctr.org> Subject: Re: sysutils/lsof Author Question (for CLANG).... Message-ID: <7662C646-941D-4E94-92C3-444752DF1EF7@FreeBSD.org> In-Reply-To: <509BBEDC.4070103@FreeBSD.org> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
Wiadomo=B6=E6 napisana przez Andriy Gapon w dniu 8 lis 2012, o godz. = 15:17: > on 08/11/2012 01:00 Greg 'groggy' Lehey said the following: >> On Wednesday, 7 November 2012 at 16:35:22 -0600, Larry Rosenman = wrote: >>> On 2012-11-07 15:39, Greg 'groggy' Lehey wrote: >>>> On Wednesday, 7 November 2012 at 10:32:23 -0500, Benjamin Kaduk >>>> wrote: >>>>>=20 >>>>> Once again, attempting to use kernel internals outside of the >>>>> supported interfaces is just asking for trouble; I do not = understand >>>>> why this message is not sinking in over the course of your = previous >>>>> mails to these lists, so I will not try to belabor it further. >>>>=20 >>>> IIRC lsof is a special case that always needs to be built with >>>> intimate knowledge of the kernel. >>>=20 >>> This is VERY true. Since some of the information lsof uses has >>> no API/ABI/KPI/KBI to get, it grovels around in the kernel. >>=20 >> And until those interfaces are provided, I think this is legitimate. >> If there's anybody out there who hasn't used lsof, you should try it. >> It's good. >=20 > 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). --=20 If you cut off my head, what would I say? Me and my head, or me and my = body?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7662C646-941D-4E94-92C3-444752DF1EF7>