From owner-freebsd-stable@FreeBSD.ORG Sat Jun 10 19:28:51 2006 Return-Path: X-Original-To: stable@FreeBSD.org Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0E67216B1A3; Sat, 10 Jun 2006 19:28:51 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6FCCE462D7; Sat, 10 Jun 2006 19:06:55 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.4) id k5AJ6omB018822; Sat, 10 Jun 2006 14:06:50 -0500 (CDT) (envelope-from dan) Date: Sat, 10 Jun 2006 14:06:50 -0500 From: Dan Nelson To: Robert Watson , stable@FreeBSD.org Message-ID: <20060610190650.GA10770@dan.emsphone.com> References: <20060607184236.P53690@fledge.watson.org> <20060609190735.GB1037@roadrunner.q.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060609190735.GB1037@roadrunner.q.local> X-OS: FreeBSD 5.5-PRERELEASE X-message-flag: Outlook Error User-Agent: Mutt/1.5.11 Cc: Subject: Re: How can I know which files a proccess is accessing? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jun 2006 19:28:51 -0000 In the last episode (Jun 09), Ulrich Spoerlein said: > Robert Watson wrote: > > A lot of people have answered and told you about lsof, which is a > > great tool, and can give you a momentary snapshot of the files a > > process has open. You might also be interested in getting a log of > > accesses, which you can do using ktrace(1). This tracks system > > calls and you can see what paths are being accessed at time of > > open. As of 7.x (and hopefully 6.2 once the MFC happens) you'll > > also be able to use audit(4) to track access of files by processes. > > Sadly, ktrace(1) seems to be rather useless in RELENG_6 right now. > Every medium sized app will result in an "out of ktrace objects" > error. I remember that some improvements to ktrace(1) went into > -CURRENT. Time for an MFC? Just raise the kern.ktrace.request_pool sysctl; 4096 works for me. -- Dan Nelson dnelson@allantgroup.com