From owner-freebsd-bugs Thu Aug 22 9:25:51 2002 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 3149037B400; Thu, 22 Aug 2002 09:25:48 -0700 (PDT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9382543E3B; Thu, 22 Aug 2002 09:25:47 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.5/8.12.5) id g7MGPlG5089840; Thu, 22 Aug 2002 11:25:47 -0500 (CDT) (envelope-from dan) Date: Thu, 22 Aug 2002 11:25:47 -0500 From: Dan Nelson To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-bugs@FreeBSD.org Subject: Re: bin/41902: [PATCH] Add queue depth to systat -v disk table Message-ID: <20020822162547.GA87685@dan.emsphone.com> References: <200208221616.g7MGGDMm072702@dan.emsphone.com> <200208221620.g7MGK2iX071939@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200208221620.g7MGK2iX071939@freefall.freebsd.org> X-OS: FreeBSD 5.0-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.1i 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 And here's the same patch for -STABLE: Index: vmstat.c =================================================================== RCS file: /home/ncvs/src/usr.bin/systat/vmstat.c,v retrieving revision 1.38.2.4 diff -u -p -r1.38.2.4 vmstat.c --- vmstat.c 12 Mar 2002 19:50:23 -0000 1.38.2.4 +++ vmstat.c 22 Aug 2002 16:17:10 -0000 @@ -340,12 +336,7 @@ labelkre() mvprintw(DISKROW + 2, DISKCOL, "tps"); mvprintw(DISKROW + 3, DISKCOL, "MB/s"); mvprintw(DISKROW + 4, DISKCOL, "%% busy"); - /* - * For now, we don't support a fourth disk statistic. So there's - * no point in providing a label for it. If someone can think of a - * fourth useful disk statistic, there is room to add it. - */ - /* mvprintw(DISKROW + 4, DISKCOL, " msps"); */ + mvprintw(DISKROW + 5, DISKCOL, "queued"); j = 0; for (i = 0; i < num_devices && j < MAXDRIVES; i++) if (dev_select[i].selected) { @@ -813,6 +804,7 @@ dinfo(dn, c, now, then) long double transfers_per_second; long double kb_per_transfer, mb_per_second; long double elapsed_time, device_busy; + long double busy_count; int di; di = dev_select[dn].position; @@ -825,6 +817,8 @@ dinfo(dn, c, now, then) then->dinfo->devices[di].busy_time : now->dinfo->devices[di].dev_creation_time); + busy_count = now->dinfo->devices[di].busy_count; + if (compute_stats(&now->dinfo->devices[di], then ? &then->dinfo->devices[di] : NULL, elapsed_time, NULL, NULL, NULL, @@ -847,4 +841,5 @@ dinfo(dn, c, now, then) putlongdouble(transfers_per_second, DISKROW + 2, c, 5, 0, 0); putlongdouble(mb_per_second, DISKROW + 3, c, 5, 2, 0); putlongdouble(device_busy * 100 / elapsed_time, DISKROW + 4, c, 5, 0, 0); + putlongdouble(busy_count, DISKROW + 5, c, 5, 0, 0); } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message