Commit Graph

25 Commits

Author SHA1 Message Date
Craig Small
5f760d5085 vmstat: Add NEWS and man page for previous 2021-10-14 18:52:34 +11:00
Christian Borntraeger
2461bb5bc1 vmstat: add guest time to stat
Since 2.6.24/33 the kernel knows about guest and guest nice time. That
is the time that is spend in KVM guests. To handle userspace programs
that do not know about this the guest time is also added to user.

Let us provide a guest time column in vmstat that collects both guest
and guest nice into a gu value.

We also subtract that value from the user time as we are now aware of
the guest value.

This commit is different to !113 in several ways:
 * newlib already knows about these to values
 * vmstat summary already shows these values
 * non-wide vmstat squishes the values

So its around the wide vmstat output.

References:
 procps-ng/procps!113
Signed-off-by: Craig Small <csmall@dropbear.xyz>
2021-04-28 18:51:34 +10:00
Craig Small
4770195b87 docs: vmstat.8 - swap is not virtual memory
Chanson Shen rightly pointed out that vmstat swpd stat is
swap memory used not virtual memory used.

Signed-off-by: Craig Small <csmall@dropbear.xyz>
2021-01-21 18:01:31 +11:00
Jan Rybar
97458da808 vmstat and watch manpage slight fixes
vmstat - align wording with proc manpage to clarify ambiguities  (rhbz#1796043)
watch - manpage presumes ntp tools are present by default (which they're not on rpm and deb distros, rhbz#1583669)
2020-07-01 08:05:53 +10:00
Craig Small
8b4228fe71 docs: some manpage fixes
Some editorial changes so the man pages follow the standards.

References:
 procps#173
2020-06-04 22:33:16 +10:00
Jaromir Capik
2f96eef7f8 library: reverting tmpfs subtraction from cached (18-FEB-2014)
The subtraction was marked as reinforcing the misconception,
that memory in the page cache can be considered free.
The Cached value is not a sum of page cache and tmpfs,
as the tmpfs memory lives in the page cache and therefore
it's an inseparable part of it.
2014-04-30 13:59:34 +02:00
Jakob Unterwurzacher
3569c0351f library: properly handle memory used by tmpfs
tmpfs has become much more widely used since distributions use it for
/tmp (Fedora 18+). In /proc/meminfo, memory used by tmpfs is accounted
into "Cached" (aka "NR_FILE_PAGES",
 http://lxr.free-electrons.com/source/mm/shmem.c#L301 ).

The tools just pass it on, so what top, free and vmstat report as
"cached" is the sum of page cache and tmpfs.

free has the extremely useful "-/+ buffers/cache" output. However, now
that tmpfs is accounted into "cached", those numbers are way off once
you have big files in /tmp.

Fortunately, kernel 2.6.32 introduces "Shmem", which makes tmpfs memory
usage accessible from userspace (
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=4b02108ac1b3354a22b0d83c684797692efdc395 ).

This patch substracts Shmem from Cached to get the actual page cache
memory. This makes both issues mentioned above disappear. For older
kernels, Shmem is not available (hence zero) and this patch is no-op.

Additionally:
* Update the man pages of free and vmstat to explain what is happening
* Finally drop "MemShared" from the /proc/meminfo parser, it has been
  dead for 10+ years and is only causing confusion ( removed in kernel
  2.5.54, see
  https://git.kernel.org/cgit/linux/kernel/git/tglx/history.git/commit/?id=fe04e9451e5a159247cf9f03c615a4273ac0c571 )
2014-02-27 14:07:10 +01:00
Jaromir Capik
4fcd56bf58 vmstat: Support for timestamps with '-t' & fix for '-wd'
From now the vmstat can append a timestamp to each line in the
VMSTAT and DISKSTAT mode. You can achieve that with the '-t'
switch.
The '-w' switch now works in the DISKSTAT mode too.
2014-02-04 19:10:42 +01:00
Jaromir Capik
1b97942c8e vmstat: -w switch for wider output
This is a rework of the merge request #5 that unconditionally
forced the output to cross the 80 chars border.
With this commit users can switch to the wide output mode
with the -w option.
2013-11-25 16:56:10 +01:00
Jaromir Capik
48e4be926d Minor fix with vmstat manpage for r column
The r column can mean a waiting to run OR running process. This is
cleared up in the man page now.

Signed-off-by: Craig Small <csmall@enc.com.au>
2012-05-30 21:41:17 +10:00
Jim Warner
421b08a4df all: fix misspellings in docs and program comments
We might as well join the coreutils and util-linux
projects in correcting our own typos.

The following was left unchanged:
   top/top.c[1797]: thru -> "through"

references:
http://lists.gnu.org/archive/html/coreutils/2012-04/msg00057.html
http://marc.info/?l=util-linux-ng&m=133518057419736&w=2

Signed-off-by: Jim Warner <james.warner@comcast.net>
2012-04-25 13:46:02 +10:00
Sami Kerola
47100a8125 docs: fix manual page warnings
All warnings where about unnecessary quoting.  The scriptlet
below will tell what was wrong.

for I in ./top/top.1 ./ps/ps.1 ./*.[0-9]; do
    echo "== $I warnings =="
    man --warnings=all $I > /dev/null
done

This should probably be turned to 'make check' script.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-04-16 12:55:53 +02:00
Sami Kerola
5e0306f042 docs: mention long options in man vmstat.8
This commit includes generic manual clean ups as well.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:03 +01:00
Michael Tokarev
04ce4db830 vmstat: do not scale si/so just like bi/bo
Use strtoull insteadof strtoul for some counters.

A patch from Debian.

Bug-Debian: http://bugs.debian.org/558361
Bug-Debian: http://bugs.debian.org/558134
Backported-by: Sami Kerola <kerolasa@iki.fi>
2011-12-18 22:54:20 +11:00
Jan Görig
039e2bb7df Manual pages fixes
Taken from Debian with small changes added

Authors: Craig Small <csmall@debian.org>, Brendan O'Dea <bod@debian.org>
2011-02-23 09:17:54 +01:00
albert
9278134e49 top: show CPU time stolen from a virtual machine 2006-06-25 02:15:36 +00:00
albert
8618adeaaf got most of procps-3.1.11ff2.diff 2003-08-10 23:40:41 +00:00
albert
5c99a21b72 diskstats and slabinfo 2003-06-08 17:28:06 +00:00
albert
573423ff40 warning + doc refs 2003-06-02 23:31:12 +00:00
albert
de2857aa89 fabian.frederick@gmx.fr vmstat code 2003-05-31 00:38:55 +00:00
albert
c64633ab31 did -s and -f for rodenstein 2002-11-28 09:07:59 +00:00
albert
80ec87f55a vmstat does IO-wait 2002-11-09 02:00:52 +00:00
albert
e4d350522e mention -a 2002-10-09 04:28:48 +00:00
albert
609ee430aa vmstat man page 157935 155684 2002-10-08 19:08:34 +00:00
csmall
03a9b5a30f procps 010114 2002-02-01 22:47:29 +00:00