From owner-freebsd-bugs@FreeBSD.ORG Tue Jan 3 11:40:21 2006 Return-Path: X-Original-To: freebsd-bugs@FreeBSD.org Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6DE0316A41F; Tue, 3 Jan 2006 11:40:21 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailout2.pacific.net.au (mailout2.pacific.net.au [61.8.0.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7894943D58; Tue, 3 Jan 2006 11:40:20 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.0.87]) by mailout2.pacific.net.au (8.13.4/8.13.4/Debian-3) with ESMTP id k03BeEkC011204; Tue, 3 Jan 2006 22:40:14 +1100 Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailproxy2.pacific.net.au (8.13.4/8.13.4/Debian-3) with ESMTP id k03BeCUL008192; Tue, 3 Jan 2006 22:40:13 +1100 Date: Tue, 3 Jan 2006 22:40:12 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Giorgos Keramidas In-Reply-To: <200601030830.k038UFXk014941@freefall.freebsd.org> Message-ID: <20060103213628.S47680@delplex.bde.org> References: <200601030830.k038UFXk014941@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-bugs@FreeBSD.org Subject: Re: bin/91034: minor fix to iostat so that columns line up with 128KB xfers X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2006 11:40:21 -0000 On Tue, 3 Jan 2006, Giorgos Keramidas wrote: > On 2005-12-28 21:16, Robert Cousins wrote: > > Iostat's output can be kind of ugly under USF2 with 128KB > > transfers. Here is an example: > > ... > > The patch I'm submitting notices when this value is >= 100 and > > drops from 2 decimals to 1 in this case. The result is an output > > like this: > > > > tty ad0 ad1 cpu > > tin tout KB/t tps MB/s KB/t tps MB/s us ni sy in id > > 0 60 0.00 0 0.00 0.00 0 0.00 50 0 0 0 50 > > 0 180 0.00 0 0.00 128.0 8 1.00 48 0 0 0 51 > > 0 61 0.00 0 0.00 0.00 0 0.00 50 0 0 0 50 > > 0 60 0.00 0 0.00 0.00 0 0.00 49 0 0 0 51 > > The misaligned dots seem a bit ugly. Indeed. They are like the -h (hideous or human-unreadable) output in many utilities. Exponential notation and columns that aren't lined up are hard for humans to read. > Is it ok to use %6.2Lf as > the format specifier, widening the KB columns a bit to fit the > new length of the text? No. There is space in the above, but most systems have more than 2 drives (most of mine have 6, with 4 physical drives and extras from atapicam duplicating acd0 and cam giving a virtual drive pass0). Info about 3 drives just fits in 80 columns with %5.2Lf format. It results in 77 coumns being used. %6.2Lf format would result in 80 columns being used and thus ugly line wrap on some terminals (or the number of drives being limited to 2). A normal number of drives also causes congestion problems in systat -v. With just 5 drives (including ones like pass0 that might never be used), there is not quite enough space for the misdocumented/undocumented extended vm stats and these stats are not displayed (except for zfod which is isn't really an extended vm stat and is displayed almost in its old place in this case); thus the actually-extended vm stats are not displayed on most systems. The misdocumentation includes still saying that zfod is in its old place after "cow" although it is now either before "cow" (to avoid its loss and minimize ugliness) if there is no space for the extended stats and in the extended stats otherwise. Bruce