Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-9]: src/bin/ps Pull up following revision(s) (requested by kamil ...



details:   https://anonhg.NetBSD.org/src/rev/dd6275d0af8d
branches:  netbsd-9
changeset: 458139:dd6275d0af8d
user:      martin <martin%NetBSD.org@localhost>
date:      Wed Aug 07 08:25:32 2019 +0000

description:
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>

diffstat:

 bin/ps/keyword.c |  15 ++++++---------
 bin/ps/ps.1      |  14 ++++++++++++--
 2 files changed, 18 insertions(+), 11 deletions(-)

diffs (102 lines):

diff -r 9d3b5565617b -r dd6275d0af8d bin/ps/keyword.c
--- a/bin/ps/keyword.c  Tue Aug 06 16:24:59 2019 +0000
+++ b/bin/ps/keyword.c  Wed Aug 07 08:25:32 2019 +0000
@@ -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 @@
 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 @@
        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 @@
        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),
diff -r 9d3b5565617b -r dd6275d0af8d bin/ps/ps.1
--- a/bin/ps/ps.1       Tue Aug 06 16:24:59 2019 +0000
+++ b/bin/ps/ps.1       Wed Aug 07 08:25:32 2019 +0000
@@ -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 @@
 .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 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 @@
 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



Home | Main Index | Thread Index | Old Index