From 9e450d21be4dbbfd87fde1f9a4a16e7dfecd27c4 Mon Sep 17 00:00:00 2001 From: bde Date: Mon, 15 Feb 1999 14:15:28 +0000 Subject: Fixed bitrot in usage message and disordering of options in previous commit. I'm not sure why we have `mvstat -z'. `sysctl vm.zone' gives more information. OTOH, `sysctl vm.zone' shouldn't return ASCII data, and reporting of memory use should be integrated, at least as an option. --- usr.bin/vmstat/vmstat.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'usr.bin') diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c index 3dcd44c..d5cec16 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.31 1999/02/10 00:46:27 ken Exp $"; + "$Id: vmstat.c,v 1.32 1999/02/13 09:59:24 dillon Exp $"; #endif /* not lint */ #include @@ -171,7 +171,7 @@ kvm_t *kd; #define VMSTAT 0x20 #define ZMEMSTAT 0x40 -void cpustats(), dointr(), domem(), dozmem(), dosum(); +void cpustats(), dointr(), domem(), dosum(), dozmem(); void dovmstat(), kread(), usage(); #ifdef notyet void dotimes(), doforkst(); @@ -194,7 +194,7 @@ main(argc, argv) memf = nlistf = NULL; interval = reps = todo = 0; maxshowdevs = 2; - while ((c = getopt(argc, argv, "c:fiM:mzN:n:p:stw:")) != -1) { + while ((c = getopt(argc, argv, "c:fiM:mN:n:p:stw:z")) != -1) { switch (c) { case 'c': reps = atoi(optarg); @@ -215,9 +215,6 @@ main(argc, argv) case 'm': todo |= MEMSTAT; break; - case 'z': - todo |= ZMEMSTAT; - break; case 'N': nlistf = optarg; break; @@ -245,6 +242,9 @@ main(argc, argv) case 'w': interval = atoi(optarg); break; + case 'z': + todo |= ZMEMSTAT; + break; case '?': default: usage(); @@ -988,6 +988,6 @@ void usage() { (void)fprintf(stderr, -"usage: vmstat [-ims] [-c count] [-M core] [-N system] [-w wait] [disks]\n"); +"usage: vmstat [-imsz] [-c count] [-M core] [-N system] [-w wait] [disks]\n"); exit(1); } -- cgit v1.1