vmstat's w column
Alex Kozlov
ak at FreeBSD.org
Tue Oct 3 22:15:22 UTC 2017
On Tue, Oct 03, 2017 at 04:31:17PM -0400, Allan Jude wrote:
> On 10/03/2017 16:21, Michael W. Lucas wrote:
> > Hi,
> >
> > (This query brought to you courtesy of tech reviews on my new freeBSD
> > book.)
> >
> > On my -current box, vmstat(8) says:
> >
> > procs Information about the numbers of processes in various states.
> >
> > r in run queue
> > b blocked for resources (i/o, paging, etc.)
> > w runnable or short sleeper (< 20 secs) but swapped
> >
> > I've had a couple people report to me that they have w entries even
> > when only a few kilobytes are swapped out.
> >
> > Is the man page wrong? Or should I tell them to report that output as
> > a bug?
> >
> I wonder if the explanation needs a comma.
> It could be read as: running, or [short sleeper that is swapped out]
This field corresponds to vmtotal.t_sw counter (see vm.vmtotal sysctl).
Its increases in two cases: thread is swapped out (TDI_SWAPPED state)
or thread is ready to run, but not in the run queue.
The short sleeper part was removed in r103216 (see kg->kg_slptime < maxslp line):
https://svnweb.freebsd.org/base/head/sys/vm/vm_meter.c?r1=99072&r2=103216
--
Alex
More information about the freebsd-hackers
mailing list