Subject: bin/8943: undocumented option in /bin/ps
To: None <gnats-bugs@gnats.netbsd.org>
From: WL <wliao@ccp.uchicago.edu>
List: netbsd-bugs
Date: 12/03/1999 09:48:47
>Number: 8943
>Category: bin
>Synopsis: -U _name_ shows process of _name_; not mentioned in man page
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: doc-bug
>Submitter-Id: net
>Arrival-Date: Fri Dec 3 09:48:00 1999
>Last-Modified:
>Originator: WL
>Organization:
>Release: 1.4.1
>Environment:
System: NetBSD torpor 1.4.1 NetBSD 1.4.1 (TORPORa) #0: Mon Nov 8 11:17:30 PST 1999 wliao@ssdlbc-pc24:/usr/src/sys/arch/i386/compile/TORPORa i386
>Description:
ps -U _name_ gives information about the specified user. This
really nice and handy switch isn't documented in the man
page, nor the ps error message.
>How-To-Repeat:
$ man ps | grep '\-U'
$ ps -help
ps: option requires an argument -- p
usage: ps [-aChjKlmrSTuvwx] [-O|o fmt] [-p pid] [-t tty]
[-M core] [-N system] [-W swap]
ps [-L]
>Fix:
Just some simple changes to /usr/src/bin/ps so the messages
show up.
$ nroff -man ps.1 | grep '\-U'
[-t tty] [-W swap] [-U username]
-U Display information associated with the specified user.
$ ./ps -help
ps: option requires an argument -- p
usage: ps [-aChjKlmrSTuvwx] [-O|o fmt] [-p pid] [-t tty]
[-M core] [-N system] [-W swap] [-U username]
ps [-L]
A "diff -u" for ps.c and ps.1 is pasted below.
--- ps.c.orig Fri Dec 3 11:14:21 1999
+++ ps.c Fri Dec 3 11:15:04 1999
@@ -532,7 +532,7 @@
(void)fprintf(stderr,
"usage:\t%s\n\t %s\n\t%s\n",
"ps [-aChjKlmrSTuvwx] [-O|o fmt] [-p pid] [-t tty]",
- "[-M core] [-N system] [-W swap]",
+ "[-M core] [-N system] [-W swap] [-U username]",
"ps [-L]");
exit(1);
/* NOTREACHED */
--- ps.1.orig Fri Dec 3 11:16:34 1999
+++ ps.1 Fri Dec 3 11:20:59 1999
@@ -63,6 +63,9 @@
.Bk -words
.Op Fl W Ar swap
.Ek
+.Bk -words
+.Op Fl U Ar username
+.Ek
.Nm ""
.Op Fl L
.Sh DESCRIPTION
@@ -165,6 +168,8 @@
option implies the
.Fl r
option.
+.It Fl U
+Display information associated with the specified user.
.It Fl v
Display information associated with the following keywords:
pid, state, time, sl, re, pagein, vsz, rss, lim, tsiz,
>Audit-Trail:
>Unformatted: