diff options
-rw-r--r-- | bin/ps/extern.h | 4 | ||||
-rw-r--r-- | bin/ps/keyword.c | 6 | ||||
-rw-r--r-- | bin/ps/print.c | 26 | ||||
-rw-r--r-- | bin/ps/ps.1 | 6 |
4 files changed, 36 insertions, 6 deletions
diff --git a/bin/ps/extern.h b/bin/ps/extern.h index d1c60e97cca..912f5cd5852 100644 --- a/bin/ps/extern.h +++ b/bin/ps/extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: extern.h,v 1.7 2002/02/16 21:27:07 millert Exp $ */ +/* $OpenBSD: extern.h,v 1.8 2002/12/19 21:29:46 mickey Exp $ */ /* $NetBSD: extern.h,v 1.10 1995/05/21 13:38:27 mycroft Exp $ */ /*- @@ -81,6 +81,8 @@ void state(KINFO *, VARENT *); void tdev(KINFO *, VARENT *); void tname(KINFO *, VARENT *); void tsize(KINFO *, VARENT *); +void dsize(KINFO *, VARENT *); +void ssize(KINFO *, VARENT *); void ucomm(KINFO *, VARENT *); void uname(KINFO *, VARENT *); void uvar(KINFO *, VARENT *); diff --git a/bin/ps/keyword.c b/bin/ps/keyword.c index ce8c0c126fe..c985b569429 100644 --- a/bin/ps/keyword.c +++ b/bin/ps/keyword.c @@ -1,4 +1,4 @@ -/* $OpenBSD: keyword.c,v 1.15 2002/07/19 14:20:44 drahn Exp $ */ +/* $OpenBSD: keyword.c,v 1.16 2002/12/19 21:29:46 mickey Exp $ */ /* $NetBSD: keyword.c,v 1.12.6.1 1996/05/30 21:25:13 cgd Exp $ */ /*- @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)keyword.c 8.5 (Berkeley) 4/2/94"; #else -static char rcsid[] = "$OpenBSD: keyword.c,v 1.15 2002/07/19 14:20:44 drahn Exp $"; +static char rcsid[] = "$OpenBSD: keyword.c,v 1.16 2002/12/19 21:29:46 mickey Exp $"; #endif #endif /* not lint */ @@ -102,6 +102,7 @@ VAR var[] = { {"command", "COMMAND", NULL, COMM|LJUST|USER, command, 16}, {"cpu", "CPU", NULL, 0, pvar, 3, 0, POFF(p_estcpu), UINT, "d"}, {"cputime", "", "time"}, + {"dsiz", "DSIZ", NULL, 0, dsize, 4}, {"emul", "EMUL", NULL, LJUST, emulname, EMULNAMELEN}, {"etime", "", "start"}, {"f", "F", NULL, 0, pvar, 7, 0, POFF(p_flag), INT, "x"}, @@ -164,6 +165,7 @@ VAR var[] = { NULL, 0, pvar, 8, 0, POFF(p_sigignore), UINT, "x"}, {"sigmask", "BLOCKED", NULL, 0, pvar, 8, 0, POFF(p_sigmask), UINT, "x"}, {"sl", "SL", NULL, INF127, pvar, 3, 0, POFF(p_slptime), UINT, "d"}, + {"ssiz", "SSIZ", NULL, 0, ssize, 4}, {"start", "STARTED", NULL, LJUST|USER, started, 8}, {"stat", "", "state"}, {"state", "STAT", NULL, 0, state, 5}, diff --git a/bin/ps/print.c b/bin/ps/print.c index 6f79f484472..1ede786ce71 100644 --- a/bin/ps/print.c +++ b/bin/ps/print.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print.c,v 1.27 2002/06/18 03:21:33 provos Exp $ */ +/* $OpenBSD: print.c,v 1.28 2002/12/19 21:29:46 mickey Exp $ */ /* $NetBSD: print.c,v 1.27 1995/09/29 21:58:12 cgd Exp $ */ /*- @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)print.c 8.6 (Berkeley) 4/16/94"; #else -static char rcsid[] = "$OpenBSD: print.c,v 1.27 2002/06/18 03:21:33 provos Exp $"; +static char rcsid[] = "$OpenBSD: print.c,v 1.28 2002/12/19 21:29:46 mickey Exp $"; #endif #endif /* not lint */ @@ -644,6 +644,28 @@ tsize(k, ve) (void)printf("%*d", v->width, pgtok(KI_EPROC(k)->e_vm.vm_tsize)); } +void +dsize(k, ve) + KINFO *k; + VARENT *ve; +{ + VAR *v; + + v = ve->var; + (void)printf("%*d", v->width, pgtok(KI_EPROC(k)->e_vm.vm_dsize)); +} + +void +ssize(k, ve) + KINFO *k; + VARENT *ve; +{ + VAR *v; + + v = ve->var; + (void)printf("%*d", v->width, pgtok(KI_EPROC(k)->e_vm.vm_ssize)); +} + /* * Generic output routines. Print fields from various prototype * structures. diff --git a/bin/ps/ps.1 b/bin/ps/ps.1 index 97c37c47506..d15a6248509 100644 --- a/bin/ps/ps.1 +++ b/bin/ps/ps.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ps.1,v 1.35 2002/09/04 17:23:40 deraadt Exp $ +.\" $OpenBSD: ps.1,v 1.36 2002/12/19 21:29:46 mickey Exp $ .\" $NetBSD: ps.1,v 1.16 1996/03/21 01:36:28 jtc Exp $ .\" .\" Copyright (c) 1980, 1990, 1991, 1993, 1994 @@ -384,6 +384,8 @@ accounting flag (alias acflg) command and arguments (alias args) .It cpu short-term CPU usage factor (for scheduling) +.It dsiz +data size (in Kbytes) .It emul name of system call emulation environment .It flags @@ -479,6 +481,8 @@ ignored signals (alias ignored) blocked signals (alias blocked) .It sl sleep time (in seconds; 127 = infinity) +.It ssiz +stack size (in Kbytes) .It start time started (alias etime) .It state |