From owner-freebsd-hackers Tue Nov 28 20:38:33 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id UAA08334 for hackers-outgoing; Tue, 28 Nov 1995 20:38:33 -0800 Received: from anacreon.sol.net (anacreon.sol.net [206.55.64.116]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id UAA08329 for ; Tue, 28 Nov 1995 20:38:23 -0800 Received: from solaria.sol.net (solaria.sol.net [206.55.65.75]) by anacreon.sol.net (8.6.12/8.6.12) with ESMTP id WAA11783 for ; Tue, 28 Nov 1995 22:38:19 -0600 Received: from localhost by solaria.sol.net (8.5/8.5) id WAA18278; Tue, 28 Nov 1995 22:39:14 -0600 From: Joe Greco Message-Id: <199511290439.WAA18278@solaria.sol.net> Subject: Changes to systat(1) To: hackers@freebsd.org Date: Tue, 28 Nov 95 22:39:11 CST X-Mailer: ELM [version 2.4dev PL65] MIME-Version: 1.0 Content-Type: text Content-Length: 4961 Sender: owner-hackers@freebsd.org Precedence: bulk The following patches fix systat to support four-character drive names (i.e. "sd20") by displaying all four characters and makes a small documentation change in the manual. A bug in iostat:numeric is also rolled in. These changes should not really affect anyone unless you happen to have a large number of disks. It's been tested on a system with a dozen disks and appears to work flawlessly. Could/would somebody please examine and commit these, and send me an "ack" or "nak"... thank you very much! ... Joe ------------------------------------------------------------------------------- Joe Greco - Systems Administrator jgreco@ns.sol.net Solaria Public Access UNIX - Milwaukee, WI 414/342-4847 *** iostat.c.fcs Sat Dec 3 04:06:26 1994 --- 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); *** vmstat.c.fcs Sat Aug 26 05:10:23 1995 --- 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); *** systat.1.fcs Sat Dec 3 04:06:37 1994 --- 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)