Subject: misc/3367: getrusage(2) man page bug
To: None <gnats-bugs@gnats.netbsd.org>
From: Brian C. Grayson <bgrayson@marvin.ece.utexas.edu>
List: netbsd-bugs
Date: 03/20/1997 10:17:27
>Number:         3367
>Category:       misc
>Synopsis:       extra 'integral' for maxrss
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    misc-bug-people (Misc Bug People)
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 20 08:35:01 1997
>Last-Modified:
>Originator:     Brian Grayson
>Organization:
	Parallel and Distributed Systems
	Electrical and Computer Engineering
	The University of Texas at Austin
>Release:        early March
>Environment:
System: NetBSD marvin 1.2 NetBSD 1.2 (MARVIN) #1: Tue Oct 1 21:46:42 CDT 1996 bgrayson@marvin:/a/orac/home/orac/src/sys/arch/i386/compile/MARVIN i386


>Description:
	The man page for getrusage contains a version of the
	declaration of the struct rusage.  However, there are a
	few differences between the man page and the real thing
	in /usr/include/sys/resource.h.  The most important is
	that the man page says ru_maxrss is the _integral_ max
	resident set size, whereas the include file says it is
	just the max resident set size, that is, the overall
	value, and not an integrated value.

	A minor nit is that the man page says ixrss is shared
	text memory size, while the include file says shared
	memory size, i.e., not just text.  I tried UTSL to
	determine which is correct, but a few minutes'
	investigation didn't show much.  But one of these two
	is wrong, and I'm sure someone out there knows the answer
	off the top of their heads.
>How-To-Repeat:
	man getrusage, and compare with /usr/include/sys/resource.h
>Fix:
        This will fix the first problem, but someone who knows
	will need to look at the second.
	
--- getrusage.2 Thu Mar 20 10:10:09 1997
+++ getrusage.2.fixed   Thu Mar 20 10:10:28 1997
@@ -64,7 +64,7 @@
 struct rusage {
         struct timeval ru_utime; /* user time used */
         struct timeval ru_stime; /* system time used */
-        long ru_maxrss;          /* integral max resident set size */
+        long ru_maxrss;          /* max resident set size */
         long ru_ixrss;           /* integral shared text memory size */
         long ru_idrss;           /* integral unshared data size */
         long ru_isrss;           /* integral unshared stack size */

>Audit-Trail:
>Unformatted: