From owner-freebsd-current@FreeBSD.ORG Thu Nov 8 15:20:10 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 817AB2CD; Thu, 8 Nov 2012 15:20:10 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-ee0-f54.google.com (mail-ee0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id AACD68FC0C; Thu, 8 Nov 2012 15:20:09 +0000 (UTC) Received: by mail-ee0-f54.google.com with SMTP id c50so2087017eek.13 for ; Thu, 08 Nov 2012 07:20:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; bh=pgd8/xnA/EgP73zGRe0+6btHVJWUpTNwyZQpT2sGCT8=; b=sR/S0txLvyJ/zVJoG2bWKJ/e0PvtYFVyAoaLwzNl4Wl2CZGnM6wwAaQM21bY8uKA+2 IFXs9tEuR3W20HwSUPS9h2mXDg18SSIKJklFaIxeiydLFsaKFJ6vRc1RUJyJidkVmT2r LK2kx5+VJuoSv7JR12tR3N+ULTjLOdaRXRJpt6FF0GH9Hj0BxREp0M5RlfYDaqKi79uc dHm2mS97vnhUeMpwpCCz+Kk5J+9RclnyALt6fnUjYyy3YSDZ+ja4uG9Z6FeX0MrPW7T8 bkFDq9bqpQoRmJ5vUDL0pijdpili1qbOXzqr2lp8SsKPgcAq6pA2kdzk1pWQb22rTha4 +NFA== Received: by 10.14.194.2 with SMTP id l2mr28538061een.12.1352388008635; Thu, 08 Nov 2012 07:20:08 -0800 (PST) Received: from [192.168.1.101] (45.81.datacomsa.pl. [195.34.81.45]) by mx.google.com with ESMTPS id f3sm70846607eeo.13.2012.11.08.07.20.07 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 08 Nov 2012 07:20:07 -0800 (PST) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Subject: Re: sysutils/lsof Author Question (for CLANG).... Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: text/plain; charset=iso-8859-2 From: =?iso-8859-2?Q?Edward_Tomasz_Napiera=B3a?= In-Reply-To: <509BBEDC.4070103@FreeBSD.org> Date: Thu, 8 Nov 2012 16:20:05 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <7662C646-941D-4E94-92C3-444752DF1EF7@FreeBSD.org> References: <5d4c4abe37bd6fffd0c206c1b7b68ce1@webmail.lerctr.org> <20121107213917.GD77848@eureka.lemis.com> <20121107230034.GF77848@eureka.lemis.com> <509BBEDC.4070103@FreeBSD.org> To: Andriy Gapon X-Mailer: Apple Mail (2.1283) Cc: Greg 'groggy' Lehey , freebsd-current@FreeBSD.org, Larry Rosenman 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 15:20:10 -0000 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?