Report process status (POSIX)
ps [-aAdEfl] [-[gG] grplist] [-o format]... [-n namelist] [-p proclist] [-t termlist] [-[uU] usrlist]
QNX Neutrino
The ps utility prints information about processes, subject to having the appropriate privilege to obtain information about those processes. With no options, ps prints information about processes associated with the current terminal. The output includes the process ID, terminal name, cumulative execution time, and command name of each process.
The options that use lists (-G, -g, -o, -p, -t, -U, and -u) can list multiple items separated by commas or white space, as long as all the items are contained within a single command-line argument. If white space is used, you'll probably need to quote the list when invoking ps from the shell.
The initial set of processes selected by -a, -A, or -d is intersected with the processes selected by the -G, -g, -p, -t, -U or -u options, if any of the latter are specified. If a process meets any of the selection criteria, its information is displayed.
If none of -a, -A, or -d is specified, ps behaves as though you specified -u your_uid.
Controlling output
The -o option controls the information that ps displays. The format argument is a comma- or space-delimited list of field names that represent information to be displayed about processes and threads.
You can override the header for a field by appending an equals sign and the new header. The rest of the characters in the argument are used as the header text. The ps utility automatically determines the width of all columns.
The ps utility recognizes the following field names:
The following field names are supported, even though they aren't required by POSIX:
The following field names display information about threads:
The comm, args, and env fields are the only ones that can contain blanks.
If you don't specify a format, ps uses:
List the process ID, cumulative CPU time, and the command with arguments for all processes, overriding the title of the last column:
ps -A -o "pid,time,args=Command (with args)"