The Zones project (PSARC/2002/174) introduced a new process attribute, the zone with which each process is associated. Although that case updated the ps(1) command to be able to print zone associations using the "-o " syntax, and this can be combined with grep, pgrep, awk, etc. to filter the output based on zone, customers have requested a more convenient syntax for filtering and displaying zone information using ps. We propose adding two new options to ps(1), -z and -Z. The output when neither option is used will be unchanged. Although the ps command as a whole is classified as Standard, these options are proposed as Stable, with the output when these options are used classified as Unstable. A release binding of Patch is requested. Sample output: # ps -AZ ZONE PID TTY TIME CMD global 0 ? 0:09 sched global 1 ? 0:00 init [...] myzone 100426 ? 0:00 zsched [...] # ps -fZ -z myzone ZONE UID PID PPID C STIME TTY TIME CMD myzone root 100426 1 0 Mar 15 ? 0:00 zsched myzone root 100648 100429 0 Mar 15 ? 0:00 /usr/lib/saf/sac -t 300 [...] Changes to the ps(1) man page: --- ps.1.orig Wed Mar 17 11:49:38 2004 +++ ps.1.new Fri Mar 19 14:51:30 2004 @@ -110,6 +110,14 @@ both RSS and SZ (see below) will be reported in units of kilobytes instead of pages. + -z zonelist + Lists only processes in the specified zones. Zones + can be specified either by name or ID. This option is + only useful when executed in the global zone. + + -Z Prints the name of the zone with which the process is + associated under an additional column header, ZONE. + Many of the options shown are used to select processes to list. If any are specified, the default list will be ignored and ps will select the processes represented by the