diff options
-rw-r--r-- | usr.bin/systat/iostat.c | 12 | ||||
-rw-r--r-- | usr.bin/systat/systat.1 | 4 | ||||
-rw-r--r-- | usr.bin/systat/vmstat.c | 4 | ||||
-rw-r--r-- | usr.sbin/iostat/iostat.c | 4 |
4 files changed, 13 insertions, 11 deletions
diff --git a/usr.bin/systat/iostat.c b/usr.bin/systat/iostat.c index 7c066f12e4d3..33e99690978d 100644 --- a/usr.bin/systat/iostat.c +++ b/usr.bin/systat/iostat.c @@ -199,11 +199,11 @@ numlabels(row) */ if (linesperregion < 3) linesperregion = 3; - col = 0; + 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 = 0, row += linesperregion + 1; + col = INSET, row += linesperregion + 1; if (row > wnd->maxy - (linesperregion + 1)) break; } @@ -229,7 +229,7 @@ barlabels(row) 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]); + mvwprintw(wnd, row++, 0, "%-4.4s bps|", dr_name[i]); mvwaddstr(wnd, row++, 0, " tps|"); if (msps) mvwaddstr(wnd, row++, 0, " msps|"); @@ -271,15 +271,15 @@ showiostat() } return; } - col = 0; + 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) { - col = 0, row += linesperregion + 1; + if (col + COLWIDTH >= wnd->maxx - INSET) { + col = INSET, row += linesperregion + 1; if (row > wnd->maxy - (linesperregion + 1)) break; wmove(wnd, row + linesperregion, 0); diff --git a/usr.bin/systat/systat.1 b/usr.bin/systat/systat.1 index 8911401505e0..4d5e77a8a671 100644 --- a/usr.bin/systat/systat.1 +++ b/usr.bin/systat/systat.1 @@ -229,7 +229,9 @@ It reports the number of seeks, transfers, and number 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. +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) diff --git a/usr.bin/systat/vmstat.c b/usr.bin/systat/vmstat.c index bfbde6c95c2b..5516b19a2250 100644 --- a/usr.bin/systat/vmstat.c +++ b/usr.bin/systat/vmstat.c @@ -330,7 +330,7 @@ labelkre() for (i = 0; i < dk_ndrive && j < MAXDRIVES; i++) if (dk_select[i]) { mvprintw(DISKROW, DISKCOL + 5 + 5 * j, - " %3.3s", dr_name[j]); + " %4.4s", dr_name[j]); j++; } for (i = 0; i < nintr; i++) { @@ -476,7 +476,7 @@ showkre() 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]); + " %4.4s", dr_name[i]); dinfo(i, ++c); } putint(s.nchcount, NAMEIROW + 2, NAMEICOL, 9); diff --git a/usr.sbin/iostat/iostat.c b/usr.sbin/iostat/iostat.c index 0cdf8a2b0e15..5d80062bf32b 100644 --- a/usr.sbin/iostat/iostat.c +++ b/usr.sbin/iostat/iostat.c @@ -334,7 +334,7 @@ phdr(signo) (void)printf(" tty"); for (i = 0; i < dk_ndrive; i++) if (dr_select[i]) - (void)printf(" %3.3s ", dr_name[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,7 +351,7 @@ dkstats() for (dn = 0; dn < dk_ndrive; ++dn) { if (!dr_select[dn]) continue; - words = cur.dk_wds[dn] * 32; /* words xfer'd */ + words = (double)cur.dk_wds[dn] * 32; /* words xfer'd */ (void)printf("%4.0f", /* sectors */ words / (DEV_BSIZE / 2) / etime); |