Date: Tue, 11 Jun 96 10:57:59 CDT From: Joe Greco <jgreco@solaria.sol.net> To: current@freebsd.org Cc: jkh@time.cdrom.com Subject: Would somebody please...! Message-ID: <199606111558.KAA05006@solaria.sol.net>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199606111558.KAA05006>