summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1996-06-11 16:18:58 +0000
committerjkh <jkh@FreeBSD.org>1996-06-11 16:18:58 +0000
commitab0ef148aeb8f95b582d87536bd38ed68b2bbf01 (patch)
treebaf8ff8be11d16eed554e1829cd1e42ab969e4a9
parentfac3b958bc4812d1b5a5f9cc95a767b94a896947 (diff)
downloadFreeBSD-src-ab0ef148aeb8f95b582d87536bd38ed68b2bbf01.zip
FreeBSD-src-ab0ef148aeb8f95b582d87536bd38ed68b2bbf01.tar.gz
Cosmetic fixes for drive names which are 4 chars long.
Submitted-By: Joe Greco <jgreco@ns.sol.net>
-rw-r--r--usr.bin/systat/iostat.c12
-rw-r--r--usr.bin/systat/systat.14
-rw-r--r--usr.bin/systat/vmstat.c4
-rw-r--r--usr.sbin/iostat/iostat.c4
4 files changed, 13 insertions, 11 deletions
diff --git a/usr.bin/systat/iostat.c b/usr.bin/systat/iostat.c
index 7c066f1..33e9969 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 8911401..4d5e77a 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 bfbde6c..5516b19 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 0cdf8a2..5d80062 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);
OpenPOWER on IntegriCloud