16.12.2012 Views

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

printf<br />

Related Information<br />

echo, print<br />

ps — Return the status of a process<br />

Format<br />

Description<br />

Options<br />

ps [–Aacdefjlm] [–G idlist] [–g grouplist] [–n name] [–o format] ... [–p proclist] [–s<br />

idlist] [–t termlist] [–U|u uidlist]<br />

ps displays status information about processes, and optionally, the threads running<br />

under each process.<br />

By default, for each process associated with the user’s terminal, ps will display the<br />

process id (PID), TTY, processor time used (TIME), and name of the command<br />

(COMM).<br />

The –a, –A, and –e options can be used to show information associated with all<br />

available or accessible processes on the system. However, these options can only<br />

show information for those processes the user has appropriate privileges to access.<br />

The –g, –G, –p, –s, –t, –u, and –U options can be used to select specific<br />

processes by process id, terminal id, and user name.<br />

The –f, –j, and –l options can be used to display additional status fields using<br />

predefined formats. The –o format option allows the user to select specific status<br />

fields and to define the format in which these fields are displayed.<br />

ps will display information for each thread associated with a process when the –m<br />

and/or –o THREAD options are used. Output lines for thread information<br />

immediately follow the output line for the parent process. Since the default behavior<br />

of ps displays process status fields only, to provide meaningful thread output, the<br />

–o option is used to specify thread specific status fields. There are some conditions,<br />

such as when the process is in a terminating or zombie state, where thread data<br />

cannot be captured. In these cases, a single thread output line will be displayed<br />

showing a ? in the thread output fields.<br />

ps accepts several options. When a description says that ps lists “all processes”, it<br />

means all the processes on the system, provided that you have appropriate<br />

privileges.<br />

The fields pcpu, nice, pri, addr, and wchan are unsupported and will always display<br />

a dash.<br />

–A Displays information on all available processes. You can specify –A, –a,<br />

and –e in any combination; however, –a overrides both –A and –e.<br />

–a Displays information on all processes associated with terminals. You can<br />

specify –A, –a, and –e in any combination; however, –a overrides both –A<br />

and –e.<br />

–c Displays more detailed information about processes for the –f and –l<br />

options. –c is accepted but not currently implemented.<br />

–d Displays information for all processes except group leaders.<br />

516 z/<strong>OS</strong> <strong>V1R9.0</strong> <strong>UNIX</strong> <strong>System</strong> <strong>Services</strong> <strong>Command</strong> Reference

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!