From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 14 10:45:22 2007 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3E1E16A417 for ; Wed, 14 Nov 2007 10:45:22 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id 7C11C13C468 for ; Wed, 14 Nov 2007 10:45:22 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 7CD804AA6B; Wed, 14 Nov 2007 05:47:03 -0500 (EST) Date: Wed, 14 Nov 2007 10:45:18 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Yuri In-Reply-To: <1194980181.4739f355a32bc@webmail.rawbw.com> Message-ID: <20071114104157.D92502@fledge.watson.org> References: <1194896018.4738aa922f776@webmail.rawbw.com> <20071112214243.Y81124@fledge.watson.org> <1194905125.4738ce25a968c@webmail.rawbw.com> <20071112222557.N81124@fledge.watson.org> <1194980181.4739f355a32bc@webmail.rawbw.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@FreeBSD.org Subject: Re: How to get filename of an open file descriptor X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2007 10:45:22 -0000 On Tue, 13 Nov 2007, Yuri wrote: > Thank you for letting me know about this new feature procstat. > > But is there any workaround in 6.3? I need to port one package that needs to > lookup file names by FDs to the current FreeBSD and need some solution now. If the port uses a script to extract the data, a tool like lsof may do the trick. However, I'm not sure there are any native APIs to query that data "as shipped" in 6.3. Once I've had some reasonable feedback on procstat(1), I'll merge it into CVS and start it on the MFC route, but 6.3 is almost certainly too soon for it to ship as part of that release. I don't know if there will be a 6.4 or not, but I would anticipate procstat(1) appearing in 7.1, and 6-STABLE if there are requests. procstat(1) mostly relies on existing sysctls, and adds two new ones for the purposes of exporting the file descriptor and VM information only, so it is a fairly straight forward MFC. Robert N M Watson Computer Laboratory University of Cambridge > > Yuri > > > Quoting Robert Watson : > >> >> On Mon, 12 Nov 2007, Yuri wrote: >> >>> Thank you for your response. >>> >>> I attempted to compile procstat but procstat.h seems to be missing in >> tgz. >> >> Yuri, >> >> Indeed -- looks like I forgot to p4 add on my development box. I've updated >> >> the tarball to now include procstat.h. If there are any other problems, do >> >> let me know. >> >> Robert N M Watson >> Computer Laboratory >> University of Cambridge >