From owner-freebsd-current Tue Jun 11 09:01:34 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id JAA09325 for current-outgoing; Tue, 11 Jun 1996 09:01:34 -0700 (PDT) Received: from mail.barrnet.net (mail.barrnet.net [131.119.246.7]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id JAA09317 for ; Tue, 11 Jun 1996 09:01:27 -0700 (PDT) Received: from smyrno.sol.net (smyrno.sol.net [206.55.64.117]) by mail.barrnet.net (8.7.5/MAIL-RELAY-LEN) with SMTP id JAA13586 for ; Tue, 11 Jun 1996 09:01:13 -0700 (PDT) Received: from solaria.sol.net (solaria.sol.net [206.55.65.75]) by smyrno.sol.net (8.6.11/8.6.12) with ESMTP id KAA25972; Tue, 11 Jun 1996 10:56:07 -0500 Received: from localhost by solaria.sol.net (8.5/8.5) id KAA05006; Tue, 11 Jun 1996 10:58:02 -0500 From: Joe Greco Message-Id: <199606111558.KAA05006@solaria.sol.net> Subject: Would somebody please...! To: current@freebsd.org Date: Tue, 11 Jun 96 10:57:59 CDT Cc: jkh@time.cdrom.com X-Mailer: ELM [version 2.4dev PL65] MIME-Version: 1.0 Content-Type: text Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk I am getting a little tired of submitting this and having no one take any action. The following patches "fix" several system utilities to correctly report disk statistics for drives with "longer-than-usual" (4 char) names. It is mostly cosmetic. They should be relatively transparent. They are relative to 2.1R but it doesn't look like much has changed lately. Could somebody please take the lead on getting these committed so that I can rest assured that my hacking efforts have done the general population some good! Thanks, ... Joe ------------------------------------------------------------------------------- Joe Greco - Systems Administrator jgreco@ns.sol.net Solaria Public Access UNIX - Milwaukee, WI 414/342-4847 *** usr.sbin/iostat/iostat.c.fcs Mon May 29 22:47:45 1995 --- usr.sbin/iostat/iostat.c Wed Nov 29 11:12:03 1995 *************** *** 334,340 **** (void)printf(" tty"); for (i = 0; i < dk_ndrive; i++) if (dr_select[i]) ! (void)printf(" %3.3s ", dr_name[i]); (void)printf(" cpu\n tin tout"); for (i = 0; i < dk_ndrive; i++) if (dr_select[i]) --- 334,340 ---- (void)printf(" tty"); for (i = 0; i < dk_ndrive; i++) if (dr_select[i]) ! (void)printf(" %4.4s ", dr_name[i]); (void)printf(" cpu\n tin tout"); for (i = 0; i < dk_ndrive; i++) if (dr_select[i]) *************** *** 351,357 **** for (dn = 0; dn < dk_ndrive; ++dn) { if (!dr_select[dn]) continue; ! words = cur.dk_wds[dn] * 32; /* words xfer'd */ (void)printf("%4.0f", /* sectors */ words / (DEV_BSIZE / 2) / etime); --- 351,357 ---- for (dn = 0; dn < dk_ndrive; ++dn) { if (!dr_select[dn]) continue; ! words = (double)cur.dk_wds[dn] * 32; /* words xfer'd */ (void)printf("%4.0f", /* sectors */ words / (DEV_BSIZE / 2) / etime); *** usr.bin/systat/systat.1.fcs Sat Dec 3 04:06:37 1994 --- usr.bin/systat/systat.1 Tue Nov 28 20:34:38 1995 *************** *** 229,235 **** of kilobyte blocks transferred per second averaged over the refresh period of the display (by default, five seconds). For some disks it also reports the average milliseconds per seek. ! Note that the system only keeps statistics on at most four disks. .Pp Below the disk display is a list of the average number of processes (over the last refresh interval) --- 229,237 ---- of kilobyte blocks transferred per second averaged over the refresh period of the display (by default, five seconds). For some disks it also reports the average milliseconds per seek. ! Note that the system only keeps statistics on at most eight disks ! (this is controlled by the constant DK_NDRIVE in /sys/dkstat.h as ! a kernel compile-time constant). .Pp Below the disk display is a list of the average number of processes (over the last refresh interval) *** usr.bin/systat/vmstat.c.fcs Sat Aug 26 05:10:23 1995 --- usr.bin/systat/vmstat.c Tue Nov 28 20:25:21 1995 *************** *** 325,331 **** for (i = 0; i < dk_ndrive && j < MAXDRIVES; i++) if (dk_select[i]) { mvprintw(DISKROW, DISKCOL + 5 + 5 * j, ! " %3.3s", dr_name[j]); j++; } for (i = 0; i < nintr; i++) { --- 325,331 ---- for (i = 0; i < dk_ndrive && j < MAXDRIVES; i++) if (dk_select[i]) { mvprintw(DISKROW, DISKCOL + 5 + 5 * j, ! " %4.4s", dr_name[j]); j++; } for (i = 0; i < nintr; i++) { *************** *** 471,477 **** for (i = 0, c = 0; i < dk_ndrive && c < MAXDRIVES; i++) if (dk_select[i]) { mvprintw(DISKROW, DISKCOL + 5 + 5 * c, ! " %3.3s", dr_name[i]); dinfo(i, ++c); } putint(s.nchcount, NAMEIROW + 2, NAMEICOL, 9); --- 471,477 ---- for (i = 0, c = 0; i < dk_ndrive && c < MAXDRIVES; i++) if (dk_select[i]) { mvprintw(DISKROW, DISKCOL + 5 + 5 * c, ! " %4.4s", dr_name[i]); dinfo(i, ++c); } putint(s.nchcount, NAMEIROW + 2, NAMEICOL, 9); *** usr.bin/systat/iostat.c.fcs Sat Dec 3 04:06:26 1994 --- usr.bin/systat/iostat.c Tue Nov 28 12:47:20 1995 *************** *** 199,209 **** */ if (linesperregion < 3) linesperregion = 3; ! col = 0; for (i = 0; i < dk_ndrive; i++) if (dk_select[i] && dk_mspw[i] != 0.0) { if (col + COLWIDTH >= wnd->maxx - INSET) { ! col = 0, row += linesperregion + 1; if (row > wnd->maxy - (linesperregion + 1)) break; } --- 199,209 ---- */ if (linesperregion < 3) linesperregion = 3; ! col = INSET; for (i = 0; i < dk_ndrive; i++) if (dk_select[i] && dk_mspw[i] != 0.0) { if (col + COLWIDTH >= wnd->maxx - INSET) { ! col = INSET, row += linesperregion + 1; if (row > wnd->maxy - (linesperregion + 1)) break; } *************** *** 229,235 **** if (dk_select[i] && dk_mspw[i] != 0.0) { if (row > wnd->maxy - linesperregion) break; ! mvwprintw(wnd, row++, 0, "%3.3s bps|", dr_name[i]); mvwaddstr(wnd, row++, 0, " tps|"); if (msps) mvwaddstr(wnd, row++, 0, " msps|"); --- 229,235 ---- if (dk_select[i] && dk_mspw[i] != 0.0) { if (row > wnd->maxy - linesperregion) break; ! mvwprintw(wnd, row++, 0, "%-4.4s bps|", dr_name[i]); mvwaddstr(wnd, row++, 0, " tps|"); if (msps) mvwaddstr(wnd, row++, 0, " msps|"); *************** *** 271,285 **** } return; } ! col = 0; wmove(wnd, row + linesperregion, 0); wdeleteln(wnd); wmove(wnd, row + 3, 0); winsertln(wnd); for (i = 0; i < dk_ndrive; i++) if (dk_select[i] && dk_mspw[i] != 0.0) { ! if (col + COLWIDTH >= wnd->maxx) { ! col = 0, row += linesperregion + 1; if (row > wnd->maxy - (linesperregion + 1)) break; wmove(wnd, row + linesperregion, 0); --- 271,285 ---- } return; } ! col = INSET; wmove(wnd, row + linesperregion, 0); wdeleteln(wnd); wmove(wnd, row + 3, 0); winsertln(wnd); for (i = 0; i < dk_ndrive; i++) if (dk_select[i] && dk_mspw[i] != 0.0) { ! if (col + COLWIDTH >= wnd->maxx - INSET) { ! col = INSET, row += linesperregion + 1; if (row > wnd->maxy - (linesperregion + 1)) break; wmove(wnd, row + linesperregion, 0); -- ... Joe ------------------------------------------------------------------------------- Joe Greco - Systems Administrator jgreco@ns.sol.net Solaria Public Access UNIX - Milwaukee, WI 414/342-4847