Module Name:    src
Committed By:   martin
Date:           Wed Aug  7 08:25:32 UTC 2019

Modified Files:
        src/bin/ps [netbsd-9]: keyword.c ps.1

Log Message:
Pull up following revision(s) (requested by kamil in ticket #24):

        bin/ps/ps.1: revision 1.110
        bin/ps/keyword.c: revision 1.57

Restore maxrss, idrss, isrss, ixrss printing in ps(1)

The RSS related statistics are now back in the NetBSD kernel.
These values were disabled since day0 until today.
libkvm(3) users will still receive inappropriate values as RSS statistics=
are updated upon sysctl(3) call.

Patch submitted by <Krzysztof Lasocki>


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.56.4.1 src/bin/ps/keyword.c
cvs rdiff -u -r1.109 -r1.109.6.1 src/bin/ps/ps.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/bin/ps/keyword.c
diff -u src/bin/ps/keyword.c:1.56 src/bin/ps/keyword.c:1.56.4.1
--- src/bin/ps/keyword.c:1.56	Wed Apr 11 18:52:05 2018
+++ src/bin/ps/keyword.c	Wed Aug  7 08:25:32 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: keyword.c,v 1.56 2018/04/11 18:52:05 christos Exp $	*/
+/*	$NetBSD: keyword.c,v 1.56.4.1 2019/08/07 08:25:32 martin Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)keyword.c	8.5 (Berkeley) 4/2/94";
 #else
-__RCSID("$NetBSD: keyword.c,v 1.56 2018/04/11 18:52:05 christos Exp $");
+__RCSID("$NetBSD: keyword.c,v 1.56.4.1 2019/08/07 08:25:32 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -60,13 +60,6 @@ __RCSID("$NetBSD: keyword.c,v 1.56 2018/
 static VAR *findvar(const char *);
 static int  vcmp(const void *, const void *);
 
-#if 0 	/* kernel doesn't calculate these */
-	PUVAR("idrss", "IDRSS", 0, p_uru_idrss, UINT64, PRIu64),
-	PUVAR("isrss", "ISRSS", 0, p_uru_isrss, UINT64, PRId64),
-	PUVAR("ixrss", "IXRSS", 0, p_uru_ixrss, UINT64, PRId64),
-	PUVAR("maxrss", "MAXRSS", 0, p_uru_maxrss, UINT64, PRIu64),
-#endif
-
 /* Compute offset in common structures. */
 #define	POFF(x)	offsetof(struct kinfo_proc2, x)
 #define	LOFF(x)	offsetof(struct kinfo_lwp, x)
@@ -135,9 +128,12 @@ VAR var[] = {
 	VAR4("groups", "GROUPS", LJUST, groups),
 	/* holdcnt: unused, left for compat. */
 	LVAR("holdcnt", "HOLDCNT", 0, l_holdcnt, INT, "d"),
+	PUVAR("idrss", "IDRSS", 0, p_uru_idrss, UINT64, PRIu64),
 	VAR3("ignored", "sigignore", ALIAS),
 	PUVAR("inblk", "INBLK", 0, p_uru_inblock, UINT64, PRIu64),
 	VAR3("inblock", "inblk", ALIAS),
+	PUVAR("isrss", "ISRSS", 0, p_uru_isrss, UINT64, PRId64),
+	PUVAR("ixrss", "IXRSS", 0, p_uru_ixrss, UINT64, PRId64),
 	PVAR("jobc", "JOBC", 0, p_jobc, SHORT, "d"),
 	PVAR("ktrace", "KTRACE", 0, p_traceflag, INT, "x"),
 /*XXX*/	PVAR("ktracep", "KTRACEP", 0, p_tracep, KPTR, PRIx64),
@@ -151,6 +147,7 @@ VAR var[] = {
 	VAR4("lstate", "STAT", LJUST|LWP, lstate),
 	VAR6("ltime", "LTIME", LWP, lcputime, 0, CPUTIME),
 	PUVAR("majflt", "MAJFLT", 0, p_uru_majflt, UINT64, PRIu64),
+	PUVAR("maxrss", "MAXRSS", 0, p_uru_maxrss, UINT64, PRIu64),
 	PUVAR("minflt", "MINFLT", 0, p_uru_minflt, UINT64, PRIu64),
 	PUVAR("msgrcv", "MSGRCV", 0, p_uru_msgrcv, UINT64, PRIu64),
 	PUVAR("msgsnd", "MSGSND", 0, p_uru_msgsnd, UINT64, PRIu64),

Index: src/bin/ps/ps.1
diff -u src/bin/ps/ps.1:1.109 src/bin/ps/ps.1:1.109.6.1
--- src/bin/ps/ps.1:1.109	Mon Aug 28 05:57:37 2017
+++ src/bin/ps/ps.1	Wed Aug  7 08:25:32 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ps.1,v 1.109 2017/08/28 05:57:37 wiz Exp $
+.\"	$NetBSD: ps.1,v 1.109.6.1 2019/08/07 08:25:32 martin Exp $
 .\"
 .\" Copyright (c) 1980, 1990, 1991, 1993, 1994
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"     @(#)ps.1	8.3 (Berkeley) 4/18/94
 .\"
-.Dd August 28, 2017
+.Dd August 6, 2019
 .Dt PS 1
 .Os
 .Sh NAME
@@ -316,6 +316,8 @@ The exact time the command started, usin
 .Dq \&%c
 format described in
 .Xr strftime 3 .
+.It Ar maxrss
+the maxiumum resident set size of the process (in 1024 byte units).
 .It Ar nice
 The process scheduling increment (see
 .Xr setpriority 2 ) .
@@ -513,6 +515,12 @@ group name (from gid)
 group names (from group access list)
 .It Ar groups
 group access list
+.It Ar idrss
+integral unshared data
+.It Ar isrss
+integral unshared stack
+.It Ar ixrss
+integral shared memory size
 .It Ar inblk
 total blocks read (alias
 .Ar inblock )
@@ -543,6 +551,8 @@ symbolic LWP state
 CPU time of the LWP
 .It Ar majflt
 total page faults
+.It Ar maxrss
+maximum resident set size
 .It Ar minflt
 total page reclaims
 .It Ar msgrcv

Reply via email to