From owner-freebsd-bugs Wed Aug 14 17:10:11 2002 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 9BA5437B400 for ; Wed, 14 Aug 2002 17:10:04 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id EB48D43E70 for ; Wed, 14 Aug 2002 17:10:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g7F0A3JU078857 for ; Wed, 14 Aug 2002 17:10:03 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g7F0A3LC078854; Wed, 14 Aug 2002 17:10:03 -0700 (PDT) Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4F37E37B400 for ; Wed, 14 Aug 2002 17:04:45 -0700 (PDT) Received: from www.freebsd.org (www.FreeBSD.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1064143E65 for ; Wed, 14 Aug 2002 17:04:45 -0700 (PDT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.12.4/8.12.4) with ESMTP id g7F04ZOT057148 for ; Wed, 14 Aug 2002 17:04:35 -0700 (PDT) (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.4/8.12.4/Submit) id g7F04ZAI057147; Wed, 14 Aug 2002 17:04:35 -0700 (PDT) Message-Id: <200208150004.g7F04ZAI057147@www.freebsd.org> Date: Wed, 14 Aug 2002 17:04:35 -0700 (PDT) From: Aragon Gouveia To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: misc/41674: iostat column formatting overlaps Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 41674 >Category: misc >Synopsis: iostat column formatting overlaps >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Aug 14 17:10:02 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Aragon Gouveia >Release: 4.6-STABLE >Organization: >Environment: FreeBSD host.fqdn.org 4.6-STABLE FreeBSD 4.6-STABLE #0: Thu Aug 8 23:39:11 SAST 2002 root@host.fqdn.org:/usr/src/sys/compile/KERN i386 >Description: When iostat outputs CPU usage values, columns are too narrow to accomodate 100%. For example: tin tout KB/t tps MB/s KB/t tps MB/s us ni sy in id 68 103 0.00 0 0.00 0.00 0 0.00 0 0 0 0100 0 319 0.00 0 0.00 0.00 0 0.00 0 0 0 0100 Making it both slightly confusing to read, and a nightmare to accurately text process. >How-To-Repeat: >Fix: Simple reformatting. Diff available from http://decoder.geek.sh/iostat.aragon.diff and also follows below : --- iostat.c Thu Jul 19 06:15:42 2001 +++ iostat.c.new Thu Aug 15 01:43:07 2002 @@ -551,7 +551,7 @@ } } if ((dflag == 0) || (Cflag > 0)) - (void)printf(" cpu\n"); + (void)printf(" cpu\n"); else (void)printf("\n"); @@ -576,7 +576,7 @@ } } if ((dflag == 0) || (Cflag > 0)) - (void)printf(" us ni sy in id\n"); + (void)printf(" us ni sy in id\n"); else printf("\n"); @@ -674,6 +674,6 @@ for (state = 0; state < CPUSTATES; ++state) time += cur.cp_time[state]; for (state = 0; state < CPUSTATES; ++state) - printf("%3.0f", + printf("%6.1f", 100. * cur.cp_time[state] / (time ? time : 1)); } >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message