From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 9 11:49:39 2010 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 4A43A1065674 for ; Thu, 9 Dec 2010 11:49:39 +0000 (UTC) (envelope-from kraduk@gmail.com) Received: from mail-ww0-f42.google.com (mail-ww0-f42.google.com [74.125.82.42]) by mx1.freebsd.org (Postfix) with ESMTP id A5A008FC1A for ; Thu, 9 Dec 2010 11:49:38 +0000 (UTC) Received: by wwi17 with SMTP id 17so3356643wwi.1 for ; Thu, 09 Dec 2010 03:49:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=IOJGUHuntE8MbWPr8Psq2XYeLGIyFI2a1p9hmtAo/mk=; b=ultWNvybNFRgU/IPYBAyBMRBsCah+edffZvvzIzzP7wXWCclJDWwIutGcyD+ARIV98 SaAHHty7VJq/67NfQG9bFaNteyBbzEB7O+kAEsWDf5BOnpxfRDVO7DDqXWqas+kL9S61 NTo32LdkfNXSDGrjUeTLXffgFnw1V66Pz1drU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=vbeAKnD719aX717iy7T/LIY3FF1g92B917GEhc8AkFhB9bd5iF6lGO6za54IY9GR3Y YGlYXG2O+ga4UkmcP9b2Z/uByUVWOiqSPSsPaunmRkG+hVQ3veR51yUoT4nNz+bedGrW 96E6dL88DIsa6ZcbEcmmjKHnJGteUhCK0Slw0= MIME-Version: 1.0 Received: by 10.216.158.140 with SMTP id q12mr467001wek.14.1291895377377; Thu, 09 Dec 2010 03:49:37 -0800 (PST) Received: by 10.216.72.198 with HTTP; Thu, 9 Dec 2010 03:49:37 -0800 (PST) In-Reply-To: <4D0020D7.5080706@freebsd.org> References: <4D000448.1050606@telenix.org> <20101208230139.2097c2e8@core.draftnet> <4D0020D7.5080706@freebsd.org> Date: Thu, 9 Dec 2010 11:49:37 +0000 Message-ID: From: krad To: Andriy Gapon X-Mailman-Approved-At: Thu, 09 Dec 2010 13:07:12 +0000 Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Bruce Cran , FreeBSD-Hackers , Matthew Fleming , Chuck Robey Subject: Re: getting a list of open files versus PID nos.? 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: Thu, 09 Dec 2010 11:49:39 -0000 On 9 December 2010 00:20, Andriy Gapon wrote: > on 09/12/2010 01:47 Matthew Fleming said the following: > > On Wed, Dec 8, 2010 at 3:01 PM, Bruce Cran wrote: > >> On Wed, 8 Dec 2010 14:54:57 -0800 > >> Matthew Fleming wrote: > >> > >>> This is what lsof is for. I believe there's one in ports, but I have > >>> never tried it. > >> > >> Is there any advantage to using lsof instead of fstat(1) (fstat -p pid)? > > > > I believe that lsof reports on all open files by all processes, > > whereas fstat will only report on a specific provided pid. > > Just try running fstat without any options. > Or procstat -a -f. > > -- > Andriy Gapon > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > not sure if dtrace is ready for it on freebsd yet, but it certainly can do it on solaris