summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkstailey <kstailey@cvs.openbsd.org>1997-02-05 17:10:56 +0000
committerkstailey <kstailey@cvs.openbsd.org>1997-02-05 17:10:56 +0000
commit1e56cd253ab7a3976ea09946af1b6ac4661ec248 (patch)
tree162da32239c42c128c9a25653b11627940abfff8
parent0a4ecdee59f5e4b4d7b6903a676f868188fbc414 (diff)
Added "gid" keyword to print effective group ID of process.
(also alpha-sorted some of the man page that was nearly sorted.) BEFORE: kstailey@hermes$ ps -o ruid,svuid,uid,command RUID SVUID UID COMMAND 333 333 333 -bash (bash) worked, but group equivalent failed: kstailey@hermes$ ps -o rgid,svgid,gid,command ps: gid: keyword not found RGID SVGID COMMAND 20 20 -bash (bash) AFTER: kstailey@hermes$ ps -o rgid,svgid,gid,command RGID SVGID GID COMMAND 20 20 20 -bash (bash)
-rw-r--r--bin/ps/keyword.c6
-rw-r--r--bin/ps/ps.112
2 files changed, 11 insertions, 7 deletions
diff --git a/bin/ps/keyword.c b/bin/ps/keyword.c
index 1b1c95fa115..c77df33ade8 100644
--- a/bin/ps/keyword.c
+++ b/bin/ps/keyword.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: keyword.c,v 1.3 1996/06/23 14:20:49 deraadt Exp $ */
+/* $OpenBSD: keyword.c,v 1.4 1997/02/05 17:10:55 kstailey 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.3 1996/06/23 14:20:49 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: keyword.c,v 1.4 1997/02/05 17:10:55 kstailey Exp $";
#endif
#endif /* not lint */
@@ -109,6 +109,7 @@ VAR var[] = {
{"cputime", "", "time"},
{"f", "F", NULL, 0, pvar, 7, POFF(p_flag), INT, "x"},
{"flags", "", "f"},
+ GID("gid", "GID", evar, EOFF(e_ucred.cr_gid)),
{"holdcnt", "HOLDCNT", NULL, 0, pvar, 8, POFF(p_holdcnt), INT, "d"},
{"ignored", "", "sigignore"},
{"inblk", "INBLK", NULL, USER, rvar, 4, ROFF(ru_inblock), LONG, "d"},
@@ -197,6 +198,7 @@ VAR var[] = {
{"cputime", "", "time"},
{"f", "F", NULL, 0, pvar, 7, POFF(p_flag), LONG, "x"},
{"flags", "", "f"},
+ {"gid", "GID", NULL, 0, pvar, UIDLEN, POFF(p_gid), USHORT, UIDFMT},
{"ignored", "", "sigignore"},
{"inblk", "INBLK", NULL, USER, rvar, 4, ROFF(ru_inblock), LONG, "d"},
{"inblock", "", "inblk"},
diff --git a/bin/ps/ps.1 b/bin/ps/ps.1
index c15f0e04028..6ae1ee9dc34 100644
--- a/bin/ps/ps.1
+++ b/bin/ps/ps.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ps.1,v 1.4 1996/07/08 22:09:28 ccappuc Exp $
+.\" $OpenBSD: ps.1,v 1.5 1997/02/05 17:10:53 kstailey Exp $
.\" $NetBSD: ps.1,v 1.16 1996/03/21 01:36:28 jtc Exp $
.\"
.\" Copyright (c) 1980, 1990, 1991, 1993, 1994
@@ -345,12 +345,14 @@ command and arguments
short-term cpu usage factor (for scheduling)
.It flags
the process flags, in hexadecimal (alias f)
+.It gid
+effective group
+.It holdcnt
+number of holds on the process (if non-zero, process can't be swapped)
.It inblk
total blocks read (alias inblock)
.It jobc
job control count
-.It holdcnt
-number of holds on the process (if non-zero, process can't be swapped)
.It ktrace
tracing flags
.It ktracep
@@ -454,8 +456,6 @@ text size (in Kbytes)
control terminal name (two letter abbreviation)
.It tty
full name of control terminal
-.It uprocp
-process pointer
.It ucomm
name to be used for accounting
.It uid
@@ -463,6 +463,8 @@ effective user
.Tn ID
.It upr
scheduling priority on return from system call (alias usrpri)
+.It uprocp
+process pointer
.It user
user name (from uid)
.It vsz