Date: Tue, 28 Nov 95 22:39:11 CST From: Joe Greco <jgreco@solaria.sol.net> To: hackers@freebsd.org Subject: Changes to systat(1) Message-ID: <199511290439.WAA18278@solaria.sol.net>
next in thread | raw e-mail | index | archive | help
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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199511290439.WAA18278>
