diff options
| author | martin <martin@NetBSD.org> | 2019-08-07 08:25:32 +0000 |
|---|---|---|
| committer | martin <martin@NetBSD.org> | 2019-08-07 08:25:32 +0000 |
| commit | 98bfa3267080ad279e807e1956d36975ec0b83a1 (patch) | |
| tree | 4a8c802193da8e4f19eb8138ac4d0f3d609bb28f /bin | |
| parent | 5ca1b465b88236554121cb45716b609ca9984d42 (diff) | |
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 (limited to 'bin')
| -rw-r--r-- | bin/ps/keyword.c | 15 | ||||
| -rw-r--r-- | bin/ps/ps.1 | 14 |
2 files changed, 18 insertions, 11 deletions
diff --git a/bin/ps/keyword.c b/bin/ps/keyword.c index f7504cab543..293af4ebc55 100644 --- a/bin/ps/keyword.c +++ b/bin/ps/keyword.c @@ -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/04/11 18:52:05 christos Exp $"); 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), diff --git a/bin/ps/ps.1 b/bin/ps/ps.1 index 635ec3b3f8d..36a49112ccb 100644 --- a/bin/ps/ps.1 +++ b/bin/ps/ps.1 @@ -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, using the .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 |
