From owner-freebsd-questions@FreeBSD.ORG Sat Oct 15 16:36:22 2005 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 82B1F16A41F for ; Sat, 15 Oct 2005 16:36:22 +0000 (GMT) (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 2643543D49 for ; Sat, 15 Oct 2005 16:36:22 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.3) id j9FGaLpD027798; Sat, 15 Oct 2005 11:36:21 -0500 (CDT) (envelope-from dan) Date: Sat, 15 Oct 2005 11:36:21 -0500 From: Dan Nelson To: Josh Paetzel Message-ID: <20051015163621.GC21223@dan.emsphone.com> References: <200510151048.39626.josh@tcbug.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200510151048.39626.josh@tcbug.org> X-OS: FreeBSD 5.4-STABLE X-message-flag: Outlook Error User-Agent: Mutt/1.5.11 Cc: questions@freebsd.org Subject: Re: Gathering statistics on disk usage 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, 15 Oct 2005 16:36:22 -0000 In the last episode (Oct 15), Josh Paetzel said: > I am trying to set up mrtg to graph disk usage. I've tried using the > output of iostat to provide me with usage in MB/s. The problem with > this is that moving data from disk to disk on the system causes the > usage to jump to around 30MB/s. Even with mrtg configured to draw > the graphs logarithmically they basically blow up and the normal > transfers are not really visable. systat -vm gives statistics on > disk usage with a percent busy field. This stat would be easier to > graph and I would like to use it. My problem is that I can't seem to > extract the output of systat properly. I've tried doing systat -vm | > tail -n -1 and that doesn't work. I've also tried systat -vm > > somefile.txt and that doesn't work. There doesn't seem to be a way > to get systat to run once and then quit either. > > Can anyone think of a way to either capture systat's output or > recommend a utility that will give me a % busy output? I've tried > iostat without success. If you apply the patch at http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/68840, you will be able to get %busy stats out of iostat. You can also try installing net-snmp and polling the diskIOLA5 value for the disk, but on my system at least, the values don't seem to make sense (I have seen numbers from -2546 to 3000). -- Dan Nelson dnelson@allantgroup.com