Date: Fri, 23 Sep 2005 07:27:58 -0500 From: Eric Anderson <anderson@centtech.com> To: Francisco Reyes <lists@natserv.com> Cc: FreeBSD Performance <freebsd-performance@freebsd.org> Subject: Re: Finding what's causing I/O Message-ID: <4333F4CE.2040109@centtech.com> In-Reply-To: <20050923080435.J58927@zoraida.natserv.net> References: <20050922214709.Q50836@zoraida.natserv.net> <84dead7205092219023228cdf5@mail.gmail.com> <20050923080435.J58927@zoraida.natserv.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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. ------------------------------------------------------------------------
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4333F4CE.2040109>