From root@zikkurat.wrzask.pl  Mon Sep 13 01:28:18 2004
Return-Path: <root@zikkurat.wrzask.pl>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 8944816A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 13 Sep 2004 01:28:18 +0000 (GMT)
Received: from zikkurat.wrzask.pl (zikkurat.wrzask.pl [213.134.171.28])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 262BC43D54
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 13 Sep 2004 01:28:16 +0000 (GMT)
	(envelope-from root@zikkurat.wrzask.pl)
Received: by zikkurat.wrzask.pl (Postfix, from userid 0)
	id B568BFA; Mon, 13 Sep 2004 03:28:09 +0200 (CEST)
Message-Id: <20040913012809.B568BFA@zikkurat.wrzask.pl>
Date: Mon, 13 Sep 2004 03:28:09 +0200 (CEST)
From: Jan Srzednicki <w@wrzask.pl>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: inaccurate information in systat(1) manpage
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         71690
>Category:       docs
>Synopsis:       [patch] inaccurate information in systat(1) manpage
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Sep 13 01:30:22 GMT 2004
>Closed-Date:    Thu Oct 12 10:55:26 GMT 2006
>Last-Modified:  Thu Oct 12 11:00:26 GMT 2006
>Originator:     Jan Srzednicki
>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:

From: Jan Srzednicki <w@wrzask.pl>
To: FreeBSD-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: bin/71690: inaccurate information in systat(1) manpage
Date: Mon, 13 Sep 2004 03:49:53 +0200

 On Mon, Sep 13, 2004 at 01:30:22AM +0000, FreeBSD-gnats-submit@FreeBSD.org wrote:
 > Thank you very much for your problem report.
 
 Sigh, originator's name should be "Jan Srzednicki".
 
 -- 
  -- Jan Srzednicki --=-- wrzask --=-- Winfried --
  -- w@wrzask.pl ----====---- http://wrzask.pl/ --
State-Changed-From-To: open->closed 
State-Changed-By: ru 
State-Changed-When: Thu Oct 12 10:54:43 UTC 2006 
State-Changed-Why:  
Fixed in -CURRENT, thanks!  Part of this was already fixed 
(differently) by bde@ in systat.1,v 1.51. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=71690 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/71690: commit references a PR
Date: Thu, 12 Oct 2006 10:55:23 +0000 (UTC)

 ru          2006-10-12 10:54:35 UTC
 
   FreeBSD src repository
 
   Modified files:
     usr.bin/systat       systat.1 
   Log:
   Memory utilization subscreen in "vmstat" display lists numbers in KB,
   not in number of pages.
   
   PR:             docs/71690
   Submitted by:   Jan Srzednicki
   
   (A patch is only partially merged, the rest was already fixed by bde@
   in rev. 1.51.)
   
   Revision  Changes    Path
   1.53      +6 -6      src/usr.bin/systat/systat.1
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
