Subject: first go at sysv ps(1) implementation
To: None <>
From: Simon Burge <>
List: tech-userlevel
Date: 06/12/2000 04:09:00
I've got something that I think is almost complete for SysV-type ps
argument handling.


	-B selects BSD mode, -X selects XPG4 (SysV, SUSv2, whatever)
	mode.  There can be more than one of these, and the last one
	takes effect - this allows for a script (say /usr/xpg4/ps) to
	have "exec /bin/ps -X" and for the user to be able to use
	"ps -B <bsdopts> regardless of which ps (/bin/ps or /usr/xpg4/ps
	or whatever) is first in their path.  This option(s) must be
	at the start of the command line and must be a single letter
	after the dash.  The default is BSD mode.

	All SysV/SUSv2 format options should be supported.

	I've thrown in a few Solaris and HP/UX extras as well.

	In BSD mode, "ps -ef" will give the SysV type behaviour.
	"ps -fe" will give something strange!


	-C   Select by command name (HP/UX-style).  Dunno about this
	     one yet - maybe too religious...
	-g   Select by progress group (SYSCTL).
	-s   Select by session id (SYSCTL).
	-G   Select by real-gid (SYSCTL).

	The above, as well as -{p,u,U,t}, only take a single argument
	instead of a list.  To do this properly would require some
	kernel work (instead of grabbing all processes and sifting
	out the unneeded ones).

	The options with (SYSCTL) require some minor kernel changes
	to implement effectively.

	The man page...

Diffs are available at

Due to the newness of all this, it is unlikely to get into the
up-and-coming 1.5 release unless lots of people lobby hard :-)