From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 14 11:20:46 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 319D516A419; Wed, 14 Nov 2007 11:20:46 +0000 (UTC) (envelope-from skip@menantico.com) Received: from vms040pub.verizon.net (vms040pub.verizon.net [206.46.252.40]) by mx1.freebsd.org (Postfix) with ESMTP id 0FEAA13C509; Wed, 14 Nov 2007 11:20:46 +0000 (UTC) (envelope-from skip@menantico.com) Received: from mx.menantico.com ([71.188.11.206]) by vms040.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0JRH004EKU6BHM96@vms040.mailsrvcs.net>; Wed, 14 Nov 2007 05:20:35 -0600 (CST) Date: Wed, 14 Nov 2007 06:23:04 -0500 From: Skip Ford In-reply-to: <20071114104157.D92502@fledge.watson.org> To: Robert Watson Mail-followup-to: Robert Watson , Yuri , freebsd-hackers@FreeBSD.org Message-id: <20071114112304.GA835@menantico.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-disposition: inline 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> <20071114104157.D92502@fledge.watson.org> User-Agent: Mutt/1.4.2.3i Cc: Yuri , 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 11:20:46 -0000 Robert Watson wrote: > 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), Well, the header file procstat.h is still missing from the tarball AFAICT so I don't know how many people are using it. Not sure what type of feedback you want, but I've been using it since you posted the link and it works as advertised. I like being able to see the vm map without using procfs. I don't like having a procstat(1) utility along with a ps(1) utility. "procstat" seems short for process status as does "ps". Seems like procstat(1) should be a library with ps(1) the frontend, or ps(1) should be merged with procstat(1). Plus, the name "procstat" sounds an awful lot like a certain part of the body that makes me uncomfortable in my chair. Do you really want to spend the rest of your life asking people to see their procstat output? ;-) But, it works fine and provides access to information that's not readily available by other means. -- Skip