Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 04 Dec 1999 14:52:01 +0100
From:      "Philippe Charnier" <charnier@xp11.frmug.org>
To:        current@FreeBSD.org
Subject:   incorrect output in pstat -s
Message-ID:  <199912041352.OAA24991@xp11.frmug.org>

next in thread | raw e-mail | index | archive | help
Hello,

Running pstat -s, I get:

Device      1K-blocks     Used    Avail Capacity  Type
/dev/rda0s2b    131808        0   131808     0%    Interleaved
/dev/rda1s1b     66432        0    66432     0%    Interleaved
/dev/rda2s1b     32640        0    32640     0%    Interleaved
/dev/rda3s1b     32640        0    32640     0%    Interleaved
Total          263520        0   263520     0%

Which I corrected with the following changes. Printing /dev/da... instead
of /dev/rda... is maybe a better fix?

Index: pstat.c
===================================================================
RCS file: /home0h/FreeBSD.cvsroot/src/usr.sbin/pstat/pstat.c,v
retrieving revision 1.46
diff -u -r1.46 pstat.c
--- pstat.c	1999/11/27 17:03:07	1.46
+++ pstat.c	1999/12/04 13:42:02
@@ -996,13 +996,13 @@
 
 	header = getbsize(&hlen, &blocksize);
 	if (totalflag == 0) {
-		(void)printf("%-11s %*s %8s %8s %8s  %s\n",
+		(void)printf("%-12s %*s %8s %8s %8s  %s\n",
 		    "Device", hlen, header,
 		    "Used", "Avail", "Capacity", "Type");
 
 		for (i = 0; i < n; ++i) {
 			(void)printf(
-			    "%-11s %*d ",
+			    "%-12s %*d ",
 			    kswap[i].ksw_devname,
 			    hlen,
 			    CONVERT(kswap[i].ksw_total)
@@ -1029,7 +1029,7 @@
 		);
 	} else if (n > 1) {
 		(void)printf(
-		    "%-11s %*d %8d %8d %5.0f%%\n",
+		    "%-12s %*d %8d %8d %5.0f%%\n",
 		    "Total",
 		    hlen, 
 		    CONVERT(kswap[n].ksw_total),

------                                                            ------ 
Philippe Charnier         charnier@{lirmm.fr,xp11.frmug.org,FreeBSD.org}

    ``a PC not running FreeBSD is like a venusian with no tentacles'' 
------------------------------------------------------------------------


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199912041352.OAA24991>