From owner-freebsd-bugs@FreeBSD.ORG Tue Jan 3 08:30:16 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 551A316A41F for ; Tue, 3 Jan 2006 08:30:16 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1549D43D58 for ; Tue, 3 Jan 2006 08:30:16 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k038UF5Y014948 for ; Tue, 3 Jan 2006 08:30:15 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k038UFXk014941; Tue, 3 Jan 2006 08:30:15 GMT (envelope-from gnats) Date: Tue, 3 Jan 2006 08:30:15 GMT Message-Id: <200601030830.k038UFXk014941@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Giorgos Keramidas Cc: 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 Reply-To: Giorgos Keramidas List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2006 08:30:16 -0000 The following reply was made to PR bin/91034; it has been noted by GNATS. From: Giorgos Keramidas To: Robert Cousins Cc: bug-followup@freebsd.org Subject: Re: bin/91034: minor fix to iostat so that columns line up with 128KB xfers Date: Tue, 3 Jan 2006 10:28:23 +0200 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: > > 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.00 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 problem comes from the KB/t column which goes one character too wide. > > 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. 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?