From owner-freebsd-questions@FreeBSD.ORG Sat Feb 20 20:56:26 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB843106566C for ; Sat, 20 Feb 2010 20:56:26 +0000 (UTC) (envelope-from bsam@ipt.ru) Received: from services.ipt.ru (services.ipt.ru [194.62.233.110]) by mx1.freebsd.org (Postfix) with ESMTP id 9A4978FC14 for ; Sat, 20 Feb 2010 20:56:26 +0000 (UTC) Received: from [85.173.16.128] (helo=izar) by services.ipt.ru with esmtpa (Exim 4.54 (FreeBSD)) id 1NiwNF-000Ay2-Ij; Sat, 20 Feb 2010 23:56:25 +0300 From: Boris Samorodov To: Dan Nelson References: <97752307@ipt.ru> <20100220202614.GG70798@dan.emsphone.com> Date: Sat, 20 Feb 2010 23:56:24 +0300 In-Reply-To: <20100220202614.GG70798@dan.emsphone.com> (Dan Nelson's message of "Sat, 20 Feb 2010 14:26:15 -0600") Message-ID: <88797383@ipt.ru> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-questions@freebsd.org Subject: Re: strange disk activity X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 20:56:26 -0000 On Sat, 20 Feb 2010 14:26:15 -0600 Dan Nelson wrote: > In the last episode (Feb 20), Boris Samorodov said: > > Hello List, > > > > I've got a very strange disk activity: > > ----- > > % iostat -xw60 da0 > > extended device statistics > > device r/s w/s kr/s kw/s wait svc_t b > > da0 43.2 204.4 971.9 10917.2 0 30.7 30 > > extended device statistics > > device r/s w/s kr/s kw/s wait svc_t b > > da0 5.1 274.6 72.7 15206.2 0 50.4 27 > > > > If I'm not mistaken it's approx. 15Mb/sec. Which means more than 1000 Tb a > > day! > > > > How can I find which program is trashing the disk? The system is > > FreeBSD-7.0 with 15 jails. Thanks for your help. > Something like this would be a good start: > dtrace -n 'syscall::write:entry { @dist[pid,execname] = sum(arg2); }' > Let it run a few seconds, then hit ^C, and it will print the total bytes > written by each process during that period. You may also have to trace > writev and pwrite, since FreeBSD's dtrace doesn't include the sysinfo > provider that would let you count them all at once. > Data written to swap or mmap'ped files won't register here, but most heavy > writes aren't done with mmap. Thanks, Dan! Dtrace is really a way to go. Unfortunately dtrace is not available at 7.0. That means that the system should be updated to 7-STABLE. Are there other possibilities meanwhile? -- WBR, Boris Samorodov (bsam) Research Engineer, http://www.ipt.ru Telephone & Internet SP FreeBSD Committer, http://www.FreeBSD.org The Power To Serve