diff --git a/bin/ps/keyword.c b/bin/ps/keyword.c index f7504cab5438..42cd59a6ba6f 100644 --- a/bin/ps/keyword.c +++ b/bin/ps/keyword.c @@ -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 635ec3b3f8d0..e022e82c30ea 100644 --- a/bin/ps/ps.1 +++ b/bin/ps/ps.1 @@ -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