From owner-freebsd-bugs Thu Aug 22 9:30:12 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 65E6C37B401 for ; Thu, 22 Aug 2002 09:30:05 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1ECED43E72 for ; Thu, 22 Aug 2002 09:30:05 -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 g7MGU5JU073707 for ; Thu, 22 Aug 2002 09:30:05 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g7MGU4c3073706; Thu, 22 Aug 2002 09:30:04 -0700 (PDT) Date: Thu, 22 Aug 2002 09:30:04 -0700 (PDT) Message-Id: <200208221630.g7MGU4c3073706@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Dan Nelson Subject: Re: bin/41902: [PATCH] Add queue depth to systat -v disk table Reply-To: Dan Nelson 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 The following reply was made to PR bin/41902; it has been noted by GNATS. From: Dan Nelson To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-bugs@FreeBSD.org Cc: Subject: Re: bin/41902: [PATCH] Add queue depth to systat -v disk table Date: Thu, 22 Aug 2002 11:25:47 -0500 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