From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 16 14:46:04 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 87DD616A417 for ; Fri, 16 Nov 2007 14:46:04 +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 4FC5A13C447 for ; Fri, 16 Nov 2007 14:46:04 +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 B0BA447064; Fri, 16 Nov 2007 09:47:56 -0500 (EST) Date: Fri, 16 Nov 2007 14:45:50 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Skip Ford In-Reply-To: <20071114132743.GB835@menantico.com> Message-ID: <20071116144356.S10677@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> <20071114104157.D92502@fledge.watson.org> <20071114112304.GA835@menantico.com> <20071114121812.U2025@fledge.watson.org> <20071114132743.GB835@menantico.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed 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: Fri, 16 Nov 2007 14:46:04 -0000 On Wed, 14 Nov 2007, Skip Ford wrote: >> I agree regarding the duplication with ps(1) -- however, I'm generally of >> the opinion that ps(1) is overburdened as tools go, and that the goals are >> actually somehwat different--procstat(1) intentionally doesn't have the >> ability to generate a list of processes, for example, taking pids >> explicitly as the argument; likewise, historically ps(1) has not been >> interested in printing more than one line per process (although I think -h >> changed this). I'll do a bit more investigation as to how easily it can be >> wedged in, and do recognize the concern here. > > I understand, and I sort of knew that from the beginning which is why I > didn't provide feedback immediately. I don't have a suggestion as to what I > think should be done. > > While procstat(1) currently takes a list of pids, I wouldn't be surprised if > somebody adds code to list all processes, unless you block it. I think it > would be useful, especially since some of it's options produce single-line > per pid output, such as credentials. > > The two utilities do provide different information, it's just a little odd > to have two utilities with basically the same name. But I can't think of a > more appropriate name for procstat(1). FWIW, it looks like on Solaris, there are a series of psig(1), pstack(1), ptree(1), etc, tools for similar sorts of per-process inspection purposes. I think I prefer bundling it into a single tool, but it's certainly a similar idea. Maybe I should just rename procstat(1) to pinfo(1) and be done with it? Robert N M Watson Computer Laboratory University of Cambridge