summaryrefslogtreecommitdiffstats
path: root/usr.bin/vmstat
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>1998-09-16 18:20:23 +0000
committerdillon <dillon@FreeBSD.org>1998-09-16 18:20:23 +0000
commit8c0ba7f8149f28db1b82011afac0af77a23eb99a (patch)
tree54c5354625ea20e1d65e3e23626531a0b6707a93 /usr.bin/vmstat
parent8f85341ce517f40dc7ac607e988eb5d11023281e (diff)
downloadFreeBSD-src-8c0ba7f8149f28db1b82011afac0af77a23eb99a.zip
FreeBSD-src-8c0ba7f8149f28db1b82011afac0af77a23eb99a.tar.gz
vmstat shows all manually-specified devices rather then just the first
three.
Diffstat (limited to 'usr.bin/vmstat')
-rw-r--r--usr.bin/vmstat/vmstat.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c
index 7f37b95..6119fb7 100644
--- a/usr.bin/vmstat/vmstat.c
+++ b/usr.bin/vmstat/vmstat.c
@@ -42,7 +42,7 @@ static const char copyright[] =
static char sccsid[] = "@(#)vmstat.c 8.1 (Berkeley) 6/6/93";
#endif
static const char rcsid[] =
- "$Id: vmstat.c,v 1.24 1998/07/06 21:01:54 bde Exp $";
+ "$Id: vmstat.c,v 1.25 1998/09/15 08:16:43 gibbs Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -154,6 +154,7 @@ devstat_select_mode select_mode;
struct vmmeter sum, osum;
int winlines = 20;
+int nflag = 0;
kvm_t *kd;
@@ -212,6 +213,7 @@ main(argc, argv)
nlistf = optarg;
break;
case 'n':
+ nflag = 1;
maxshowdevs = atoi(optarg);
if (maxshowdevs < 0)
errx(1, "number of devices %d is < 0",
@@ -349,6 +351,9 @@ getdrivedata(argv)
}
dev_select = NULL;
+ if (nflag == 0 && maxshowdevs < num_devices_specified)
+ maxshowdevs = num_devices_specified;
+
/*
* People are generally only interested in disk statistics when
* they're running vmstat. So, that's what we're going to give
OpenPOWER on IntegriCloud