Template Version: @(#)sac_nextcase %I% %G% SMI This information is Copyright 2009 Sun Microsystems 1. Introduction 1.1. Project/Component Working Name: Unified ps(1) 1.2. Name of Document Author/Supplier: Author: Casper Dik 1.3 Date of This Document: 09 February, 2009 4. Technical Description I'm sponsoring this fasttrack for myself.
I request Patch/Micro release binding (this change is compatible). We currently ship two "ps" executables: /usr/bin/ps and /usr/ucb/ps. Some people prefer "ps -ef" and others like "ps uxga". It's fairly easy to unify the commands so that we do the "right thing". We propose that the unified command works as follows: If a first argument is present and it does not start with a "-" we run as "/usr/ucb/ps" If a first argument is present and it starts with "-" and some of the characters passed aren't ucb ps options, we run as "/usr/bin/ps" If neither are not the case, then ps will behave as before: /usr/ucb/ps and /usr/bin/ps will both work as before, depending on the getexecname() return value. The /usr/ucb/*/ps binaries will be hardlinked to /usr/bin/*/ps. They will stay in their respective packages. The /usr/ucb/sparcv7/ps binary is removed; there is no /usr/bin/sparcv7/ps. Sample with /usr/bin first in $PATH # ps -ef UID PID PPID C STIME TTY TIME CMD root 0 0 0 22:10:42 ? 0:01 sched root 1 0 0 22:10:44 ? 0:02 /sbin/init root 2 0 0 22:10:44 ? 0:00 pageout root 3 0 0 22:10:44 ? 1:22 fsflush # ps uxga USER PID %CPU %MEM SZ RSS TT S START TIME COMMAND root 751 0.2 2.62818426328 ?? S 22:12:42 0:05 xterm -ls -n moloc root 3 0.1 0.0 0 0 ? S 22:10:43 1:21 fsflush root 19210 0.1 0.1 1832 1112 pts/1 O 11:31:40 0:00 ps uxga root 19207 0.1 0.3 4640 2800 pts/1 S 11:31:04 0:00 ksh93 # ps -uxga ps: unknown user xga # ps xa PID TT S TIME COMMAND 0 ? T 0:00 sched 1 ? S 0:02 /sbin/init 2 ? S 0:00 pageout 3 ? S 1:21 fsflush # ps -xa ps: illegal option -- x usage: ps [ -aAdefHlcjLPyZ ] [ -o format ] [ -t termlist ] ..... # ps -e PID TTY TIME CMD 0 ? 0:01 sched 1 ? 0:02 init 2 ? 0:00 pageout 3 ? 1:22 fsflush with /usr/ucb first in $PATH # ps -ef UID PID PPID C STIME TTY TIME CMD root 0 0 0 22:10:42 ? 0:01 sched root 1 0 0 22:10:44 ? 0:02 /sbin/init root 2 0 0 22:10:44 ? 0:00 pageout root 3 0 0 22:10:44 ? 1:22 fsflush # ps -ax PID TT S TIME COMMAND 0 ? T 0:00 sched 1 ? S 0:02 /sbin/init 2 ? S 0:00 pageout 3 ? S 1:21 fsflush # ps -ugxa USER PID %CPU %MEM SZ RSS TT S START TIME COMMAND root 751 0.2 2.62818426328 ?? S 22:12:42 0:06 xterm -ls -n moloc root 605 0.2 0.3 3720 3104 ? S 22:12:31 0:01 /usr/lib/autofs/au root 3 0.1 0.0 0 0 ? S 22:10:43 1:21 fsflush root 19220 0.1 0.1 1816 1104 pts/1 O 11:34:38 0:00 ps -ugxa # ps -e PID TT S TIME COMMAND 3008 console S 0:00 /usr/lib/saf/ttymon -g -d /dev/console -l console -T xt 1061 pts/1 S 0:01 -tcsh SUPER_USER=casper DISPLAY=localhost:10.0 HOME=/ L 19207 pts/1 S 0:00 ksh93 SUPER_USER=casper DISPLAY=localhost:10.0 HOME=/ L 19261 pts/1 O 0:00 ps -e _=/usr/ucb/ps DISPLAY=localhost:10.0 EXINIT=set t 6. Resources and Schedule 6.4. Steering Committee requested information 6.4.1. Consolidation C-team Name: os-net 6.5. ARC review type: FastTrack 6.6. ARC Exposure: open