From owner-freebsd-performance@FreeBSD.ORG Fri Sep 23 12:28:03 2005 Return-Path: X-Original-To: freebsd-performance@freebsd.org Delivered-To: freebsd-performance@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 09BF216A420 for ; Fri, 23 Sep 2005 12:28:03 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from mh1.centtech.com (moat3.centtech.com [207.200.51.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id A9DB443D58 for ; Fri, 23 Sep 2005 12:28:00 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [10.177.171.220] (neutrino.centtech.com [10.177.171.220]) by mh1.centtech.com (8.13.1/8.13.1) with ESMTP id j8NCRxKv089983; Fri, 23 Sep 2005 07:27:59 -0500 (CDT) (envelope-from anderson@centtech.com) Message-ID: <4333F4CE.2040109@centtech.com> Date: Fri, 23 Sep 2005 07:27:58 -0500 From: Eric Anderson User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.11) Gecko/20050914 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Francisco Reyes References: <20050922214709.Q50836@zoraida.natserv.net> <84dead7205092219023228cdf5@mail.gmail.com> <20050923080435.J58927@zoraida.natserv.net> In-Reply-To: <20050923080435.J58927@zoraida.natserv.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.82/1098/Thu Sep 22 15:57:50 2005 on mh1.centtech.com X-Virus-Status: Clean Cc: FreeBSD Performance Subject: Re: Finding what's causing I/O X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2005 12:28:03 -0000 Francisco Reyes wrote: > On Fri, 23 Sep 2005, Joseph Koshy wrote: > >>> Is there a way to find out which program(s) are causing >>> the I/O? >> >> >> ktrace(8); you can use it to trace all descendants of 'init'. > > > Looking at the man page it's non-obvious how to use it (to me). > > > Specially it seems one needs to indicate a pid or a command. How do I > trace all programs? Maybe you provide the init pid, and the -i option. I played with this a bit last night, and found out I really love this tool! Here's what I did to play with it: (find pid of a bash shell running - was 1268) In another shell: ktrace -tni -ip 1268 In ktraced shell: cd / cd /tmp touch t cat t rm t In ktrace shell window: ktrace -C kdump | less That should give you a quick idea how to use it. The man page is pretty decent. Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------