From owner-freebsd-current@FreeBSD.ORG Sun May 14 19:11:40 2006 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7878616A43C for ; Sun, 14 May 2006 19:11:40 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.189]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2C48D43D4C for ; Sun, 14 May 2006 19:11:38 +0000 (GMT) (envelope-from uspoerlein@gmail.com) Received: by nf-out-0910.google.com with SMTP id x29so268177nfb for ; Sun, 14 May 2006 12:11:37 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:from:to:subject:message-id:mail-followup-to:mime-version:content-type:content-disposition; b=WA1JkKAaOq7+JoAbsnWRdAHGkWhiqkRrXw7hmdPiHPRE8ZrmxkuDS6jq7EfeM5ueoKoCEfAjackrK/OyluCKILOWq6W/IJcHOP8InX8pOp3FEionwpLV7X5nya1WhDS+AydIPG5soCpsLHOwCGDXyvMBjJ1wT+K037movHs01B4= Received: by 10.49.5.8 with SMTP id h8mr1639045nfi; Sun, 14 May 2006 11:46:23 -0700 (PDT) Received: from roadrunner.q.local ( [217.185.114.67]) by mx.gmail.com with ESMTP id x1sm1057182nfb.2006.05.14.11.45.57; Sun, 14 May 2006 11:46:23 -0700 (PDT) Received: from roadrunner.q.local (localhost [127.0.0.1]) by roadrunner.q.local (8.13.6/8.13.6) with ESMTP id k4EIj8jL004879 for ; Sun, 14 May 2006 20:45:08 +0200 (CEST) (envelope-from uspoerlein@gmail.com) Received: (from q@localhost) by roadrunner.q.local (8.13.6/8.13.6/Submit) id k4EFtUX2003395 for current@freebsd.org; Sun, 14 May 2006 17:55:30 +0200 (CEST) (envelope-from uspoerlein@gmail.com) Date: Sun, 14 May 2006 17:55:30 +0200 From: Ulrich Spoerlein To: current@freebsd.org Message-ID: <20060514155530.GA3247@roadrunner.informatik.uni-wuerzburg.de> Mail-Followup-To: current@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="uZ3hkaAS1mZxFaxD" Content-Disposition: inline Cc: Subject: iostat column width display X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2006 19:11:40 -0000 --uZ3hkaAS1mZxFaxD Content-Type: multipart/mixed; boundary="45Z9DzgjV8m4Oswq" Content-Disposition: inline --45Z9DzgjV8m4Oswq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello all, the column widths in iostat(1) output are not spaced correctly. tty ad0 da0 cd0 cpu tin tout KB/t tps MB/s KB/t tps MB/s KB/t tps MB/s us ni sy in id 14 170 0.00 0 0.00 128.00 202 25.23 0.00 0 0.00 2 0 10 6 82 15 324 0.00 0 0.00 128.00 202 25.23 0.00 0 0.00 2 0 0 5 94 KB/t > 100 make the display overflow. KB/t is not helpful anyway, because '1.00' is of width 4, whereas '1024' (bytes) would be of width 4 too. So either cut it down to '1.0' or just use the byte count anyway. Proposed patch is attached. It simply changes the display to %5.1f, an alternative would be to remove the additional spaces between different devices. Ulrich Spoerlein PS: This still sucks, as transfer rates above 100MB/s will make the display overflow again :( --=20 PGP Key ID: 20FEE9DD Encrypted mail welcome! Fingerprint: AEC9 AF5E 01AC 4EE1 8F70 6CBD E76E 2227 20FE E9DD Which is worse: ignorance or apathy? Don't know. Don't care. --45Z9DzgjV8m4Oswq Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=patch Content-Transfer-Encoding: quoted-printable --- iostat.c Sun May 14 17:48:29 2006 +++ iostat.c.orig Sat Mar 15 22:59:06 2003 @@ -697,7 +697,7 @@ ms_per_transaction); } else { if (Iflag =3D=3D 0) - printf(" %5.1Lf %3.0Lf %5.2Lf ",=20 + printf(" %5.2Lf %3.0Lf %5.2Lf ",=20 kb_per_transfer, transfers_per_second, mb_per_second); @@ -705,7 +705,7 @@ total_mb =3D total_bytes; total_mb /=3D 1024 * 1024; =20 - printf(" %5.1Lf %3.1qu %5.2Lf ",=20 + printf(" %5.2Lf %3.1qu %5.2Lf ",=20 kb_per_transfer, total_transfers, total_mb); --45Z9DzgjV8m4Oswq-- --uZ3hkaAS1mZxFaxD Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQFEZ1Ly524iJyD+6d0RAqjvAJ0dK0hSe48ZXpMyAUaU80UI+6OnGQCfWop8 Nx7btbYoSkzfSKrhPLIgIJI= =453w -----END PGP SIGNATURE----- --uZ3hkaAS1mZxFaxD--