Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Sep 2004 03:28:09 +0200 (CEST)
From:      Jan Srzednicki <w@wrzask.pl>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   bin/71690: inaccurate information in systat(1) manpage
Message-ID:  <20040913012809.B568BFA@zikkurat.wrzask.pl>
Resent-Message-ID: <200409130130.i8D1UNQ4062004@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         71690
>Category:       bin
>Synopsis:       inaccurate information in systat(1) manpage
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Sep 13 01:30:22 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Zdzisław Korzeń
>Release:        FreeBSD 4.x, 5.x, 6.x (all trees)
>Organization:
wrzask.pl
>Environment:
System: FreeBSD zikkurat.wrzask.pl 5.3-BETA2 FreeBSD 5.3-BETA2 #9: Sun Aug 29 14:24:19 CEST 2004 root@zikkurat.wrzask.pl:/usr/obj/usr/src/sys/SIN i386


	
>Description:

The manpage for systat(1) is not accurate on what exacly is displayed
by the "vmstat" systat mode. It describes all the elements pretty well.
In the description of various virtual memory elements (like virtual/real
memory pages, active/inactive/wired pages etc.) it says that the numbers
displayed by systat are in page units. This is not true - the normal
page size is 4kB on an i386, and the numbers displayed are apparently
in kilobyte units (I have checked that on several machines, having say
100000 total real pages on a 128MB RAM machine is impossible; 
sysctl vm.vmtotal confirms that, comparing some numbers to the
top(1) output was also enlightening).

So, to make things clear, the manpage should state that the numbers
are not number of pages, but number of kilobytes in pages allocated
for something. It's also worth noting that not every 'number of pages'
in the display actually means 'number of kilobytes in pages'; it does not
affect page counts after 'daefr' or zero-fill page counts.

The display may be somewhat confusing, as the units (pages
and kilobytes) are mixed with each other and one has to remember
which counter has which units. But that's another issue..

	
>How-To-Repeat:
>Fix:

That's my proposal, it isn't very elegant, but at least makes
it clear which counter are in pages, which in kilobytes.


--- systat.1.old        Mon Sep 13 02:45:30 2004
+++ systat.1    Mon Sep 13 03:22:07 2004
@@ -301,15 +301,16 @@
 active processes, that is processes that have run in the previous
 twenty seconds.
 The second row reports on memory usage of all processes.
-The first column reports on the number of physical pages
-claimed by processes.
-The second column reports the number of physical pages that
-are devoted to read only text pages.
+The first column reports on the number of kilobytes in
+physical pages claimed by processes.
+The second column reports the number of kilobytes in 
+physical pages that are devoted to read only text pages.
 The third and fourth columns report the same two figures for
-virtual pages, that is the number of pages that would be
+virtual pages, that is the number of kilobytes in 
+pages that would be
 needed if all processes had all of their pages.
-Finally the last column shows the number of physical pages
-on the free list.
+Finally the last column shows the number of kilobytes in
+physical pages on the free list.
 .Pp
 Below the memory display is a list of the
 average number of processes (over the last refresh interval)
@@ -367,11 +368,11 @@
 pages copied on write (`cow'),
 pages zero filled on demand (`zfod'),
 slow (on-the-fly) zero fills percentage (`%slo-z'),
-pages wired down (`wire'),
-active pages (`act'),
-inactive pages (`inact'),
-pages on the buffer cache queue (`cache'),
-number of free pages (`free'),
+kilobytes in pages wired down (`wire'),
+kilobytes in active pages (`act'),
+kilobytes in inactive pages (`inact'),
+kilobytes in pages on the buffer cache queue (`cache'),
+number of kilobytes in free pages (`free'),
 pages freed by the page daemon (`daefr'),
 pages freed by exiting processes (`prcfr'),
 pages reactivated from the free list (`react'),



	


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040913012809.B568BFA>