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.
This commit is contained in:
parent
218221f38a
commit
91e6422650
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=44067
@ -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 <sys/param.h>
|
||||
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user