diff options
-rw-r--r-- | usr.bin/vmstat/vmstat.8 | 13 | ||||
-rw-r--r-- | usr.bin/vmstat/vmstat.c | 13 |
2 files changed, 10 insertions, 16 deletions
diff --git a/usr.bin/vmstat/vmstat.8 b/usr.bin/vmstat/vmstat.8 index 4c0a726e380..a5bd4b45de2 100644 --- a/usr.bin/vmstat/vmstat.8 +++ b/usr.bin/vmstat/vmstat.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: vmstat.8,v 1.37 2016/03/30 06:58:06 jmc Exp $ +.\" $OpenBSD: vmstat.8,v 1.38 2017/05/10 08:37:15 mpi Exp $ .\" $NetBSD: vmstat.8,v 1.12 1996/05/10 23:19:30 thorpej Exp $ .\" .\" Copyright (c) 1986, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)vmstat.8 8.1 (Berkeley) 6/6/93 .\" -.Dd $Mdocdate: March 30 2016 $ +.Dd $Mdocdate: May 10 2017 $ .Dt VMSTAT 8 .Os .Sh NAME @@ -121,16 +121,11 @@ Information about the numbers of processes in various states. .Bl -tag -width 4n -compact .It Li r in run queue -.It Li b -blocked for resources (I/O, paging, etc.) -.It Li w -runnable or short sleeper (< 20 secs) but swapped +.It Li s +sleeping .El .It Li memory Information about the usage of virtual and real memory. -Virtual pages -(reported in units of 1024 bytes) are considered active if they belong -to processes which are running or have run in the last 20 seconds. .Pp .Bl -tag -width 4n -compact .It Li avm diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c index 10f1d74572d..6619a06e2f2 100644 --- a/usr.bin/vmstat/vmstat.c +++ b/usr.bin/vmstat/vmstat.c @@ -1,5 +1,5 @@ /* $NetBSD: vmstat.c,v 1.29.4.1 1996/06/05 00:21:05 cgd Exp $ */ -/* $OpenBSD: vmstat.c,v 1.141 2016/08/14 22:47:26 guenther Exp $ */ +/* $OpenBSD: vmstat.c,v 1.142 2017/05/10 08:37:15 mpi Exp $ */ /* * Copyright (c) 1980, 1986, 1991, 1993 @@ -358,13 +358,12 @@ dovmstat(u_int interval, int reps) warn("could not read vm.vmmeter"); memset(&total, 0, sizeof(total)); } - (void)printf(" %u %u %u ", - total.t_rq - 1, total.t_dw + total.t_pw, total.t_sw); + (void)printf("%2u %3u", total.t_rq - 1, total.t_sl); #define rate(x) ((unsigned)((((unsigned)x) + halfuptime) / uptime)) /* round */ #define pgtok(a) ((a) * ((unsigned int)uvmexp.pagesize >> 10)) - (void)printf("%6u %7u ", - pgtok(uvmexp.active + uvmexp.swpginuse), - pgtok(uvmexp.free)); + (void)printf("%5uM %6uM ", + pgtok(uvmexp.active + uvmexp.swpginuse) / 1024, + pgtok(uvmexp.free) / 1024); (void)printf("%4u ", rate(uvmexp.faults - ouvmexp.faults)); (void)printf("%3u ", rate(uvmexp.pdreact - ouvmexp.pdreact)); (void)printf("%3u ", rate(uvmexp.pageins - ouvmexp.pageins)); @@ -410,7 +409,7 @@ printhdr(void) (void)printf("%*s traps cpu\n", ndrives * 3, ""); - (void)printf(" r b w avm fre flt re pi po fr sr "); + (void)printf(" r s avm fre flt re pi po fr sr "); for (i = 0; i < dk_ndrive; i++) if (dk_select[i]) (void)printf("%c%c%c ", dr_name[i][0], |