Bug 151283

Summary: [patch] top(1) change pages to bytes in description of memory
Product: Documentation Reporter: Bas Smeelen <b.smeelen>
Component: Books & ArticlesAssignee: Bruce Cran <brucec>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Bas Smeelen 2010-10-07 15:10:01 UTC
The top manpage states in the memory discription that the output is in pages. 
The output of top in the memory section is apparantly in bytes, this can be verified in the top source file on lines 430 to 460 at the comment /* conve
rt memory stats to Kbytes */
This has been discussed on freebsd-questions october 2010

Fix: See patch below

Patch attached with submission follows:
How-To-Repeat: Execute top and verify the output.
Comment 1 dfilter service freebsd_committer freebsd_triage 2010-11-13 11:43:27 UTC
Author: brucec
Date: Sat Nov 13 11:43:20 2010
New Revision: 215239
URL: http://svn.freebsd.org/changeset/base/215239

Log:
  Memory stats are reported in bytes, not pages.
  
  PR:	docs/151283
  Submitted by:	Bas Smeelen <b.smeelen at ose.nl>
  MFC after: 3 days

Modified:
  head/usr.bin/top/top.local.1

Modified: head/usr.bin/top/top.local.1
==============================================================================
--- head/usr.bin/top/top.local.1	Sat Nov 13 11:11:51 2010	(r215238)
+++ head/usr.bin/top/top.local.1	Sat Nov 13 11:43:20 2010	(r215239)
@@ -6,8 +6,8 @@ The '-H' option will toggle the display 
 At runtime the 'H' key will toggle this mode. The default is OFF.
 
 .SH DESCRIPTION OF MEMORY 
-Mem: 9220K Active, 1032K Inact, 3284K Wired, 1MB Cache, 2M Buf, 1320K Free
-Swap:   91M Total, 79M Free, 13% Inuse, 80K In, 104 K Out
+Mem: 9220K Active, 1032K Inact, 3284K Wired, 1M Cache, 2M Buf, 1320K Free
+Swap: 91M Total, 79M Free, 13% Inuse, 80K In, 104K Out
 
 .B K:
 Kilobyte
@@ -19,23 +19,23 @@ Megabyte
 1/100
 .TP
 .B Active:
-number of pages active
+number of bytes active
 .TP
 .B Inact:
-number of pages inactive
+number of bytes inactive
 .TP
 .B Wired:
-number of pages wired down, including cached file data pages
+number of bytes wired down, including cached file data pages
 .TP
 .B Cache:
-number of clean pages caching data that are available for
+number of clean bytes caching data that are available for
 immediate reallocation
 .TP
 .B Buf:
-number of pages used for BIO-level disk caching
+number of bytes used for BIO-level disk caching
 .TP
 .B Free: 
-number of pages free
+number of bytes free
 .TP
 .B Total: 
 total available swap usage
@@ -47,7 +47,7 @@ total free swap usage
 swap usage
 .TP 
 .B In: 
-pages paged in from swap devices (last interval)
+bytes paged in from swap devices (last interval)
 .TP
 .B Out: 
-pages paged out to swap devices (last interval)
+bytes paged out to swap devices (last interval)
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 2 Bruce Cran freebsd_committer freebsd_triage 2010-11-13 12:10:23 UTC
State Changed
From-To: open->patched

Fixed in HEAD. 


Comment 3 Bruce Cran freebsd_committer freebsd_triage 2010-11-13 12:10:23 UTC
Responsible Changed
From-To: freebsd-doc->brucec

Take.
Comment 4 dfilter service freebsd_committer freebsd_triage 2010-11-16 07:24:25 UTC
Author: brucec
Date: Tue Nov 16 07:24:17 2010
New Revision: 215380
URL: http://svn.freebsd.org/changeset/base/215380

Log:
  MFC r215239:
  
  Memory stats are reported in bytes, not pages.
  
  PR:	docs/151283
  Submitted by:	Bas Smeelen <b.smeelen at ose.nl>

Modified:
  stable/8/usr.bin/top/top.local.1
Directory Properties:
  stable/8/usr.bin/top/   (props changed)

Modified: stable/8/usr.bin/top/top.local.1
==============================================================================
--- stable/8/usr.bin/top/top.local.1	Tue Nov 16 07:19:05 2010	(r215379)
+++ stable/8/usr.bin/top/top.local.1	Tue Nov 16 07:24:17 2010	(r215380)
@@ -6,8 +6,8 @@ The '-H' option will toggle the display 
 At runtime the 'H' key will toggle this mode. The default is OFF.
 
 .SH DESCRIPTION OF MEMORY 
-Mem: 9220K Active, 1032K Inact, 3284K Wired, 1MB Cache, 2M Buf, 1320K Free
-Swap:   91M Total, 79M Free, 13% Inuse, 80K In, 104 K Out
+Mem: 9220K Active, 1032K Inact, 3284K Wired, 1M Cache, 2M Buf, 1320K Free
+Swap: 91M Total, 79M Free, 13% Inuse, 80K In, 104K Out
 
 .B K:
 Kilobyte
@@ -19,23 +19,23 @@ Megabyte
 1/100
 .TP
 .B Active:
-number of pages active
+number of bytes active
 .TP
 .B Inact:
-number of pages inactive
+number of bytes inactive
 .TP
 .B Wired:
-number of pages wired down, including cached file data pages
+number of bytes wired down, including cached file data pages
 .TP
 .B Cache:
-number of clean pages caching data that are available for
+number of clean bytes caching data that are available for
 immediate reallocation
 .TP
 .B Buf:
-number of pages used for BIO-level disk caching
+number of bytes used for BIO-level disk caching
 .TP
 .B Free: 
-number of pages free
+number of bytes free
 .TP
 .B Total: 
 total available swap usage
@@ -47,7 +47,7 @@ total free swap usage
 swap usage
 .TP 
 .B In: 
-pages paged in from swap devices (last interval)
+bytes paged in from swap devices (last interval)
 .TP
 .B Out: 
-pages paged out to swap devices (last interval)
+bytes paged out to swap devices (last interval)
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 5 dfilter service freebsd_committer freebsd_triage 2010-11-16 07:26:55 UTC
Author: brucec
Date: Tue Nov 16 07:26:49 2010
New Revision: 215381
URL: http://svn.freebsd.org/changeset/base/215381

Log:
  MFC r215239:
  
  Memory stats are reported in bytes, not pages.
  
  PR:	docs/151283
  Submitted by:	Bas Smeelen <b.smeelen at ose.nl>

Modified:
  stable/7/usr.bin/top/top.local.1
Directory Properties:
  stable/7/usr.bin/top/   (props changed)

Modified: stable/7/usr.bin/top/top.local.1
==============================================================================
--- stable/7/usr.bin/top/top.local.1	Tue Nov 16 07:24:17 2010	(r215380)
+++ stable/7/usr.bin/top/top.local.1	Tue Nov 16 07:26:49 2010	(r215381)
@@ -6,8 +6,8 @@ The '-H' option will toggle the display 
 At runtime the 'H' key will toggle this mode. The default is OFF.
 
 .SH DESCRIPTION OF MEMORY 
-Mem: 9220K Active, 1032K Inact, 3284K Wired, 1MB Cache, 2M Buf, 1320K Free
-Swap:   91M Total, 79M Free, 13% Inuse, 80K In, 104 K Out
+Mem: 9220K Active, 1032K Inact, 3284K Wired, 1M Cache, 2M Buf, 1320K Free
+Swap: 91M Total, 79M Free, 13% Inuse, 80K In, 104K Out
 
 .B K:
 Kilobyte
@@ -19,23 +19,23 @@ Megabyte
 1/100
 .TP
 .B Active:
-number of pages active
+number of bytes active
 .TP
 .B Inact:
-number of pages inactive
+number of bytes inactive
 .TP
 .B Wired:
-number of pages wired down, including cached file data pages
+number of bytes wired down, including cached file data pages
 .TP
 .B Cache:
-number of clean pages caching data that are available for
+number of clean bytes caching data that are available for
 immediate reallocation
 .TP
 .B Buf:
-number of pages used for BIO-level disk caching
+number of bytes used for BIO-level disk caching
 .TP
 .B Free: 
-number of pages free
+number of bytes free
 .TP
 .B Total: 
 total available swap usage
@@ -47,7 +47,7 @@ total free swap usage
 swap usage
 .TP 
 .B In: 
-pages paged in from swap devices (last interval)
+bytes paged in from swap devices (last interval)
 .TP
 .B Out: 
-pages paged out to swap devices (last interval)
+bytes paged out to swap devices (last interval)
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 6 Bruce Cran freebsd_committer freebsd_triage 2010-11-16 07:28:02 UTC
State Changed
From-To: patched->closed

Merged to stable/7 and stable/8.