- Ps (Unix)
In most
Unix-like operating systems, the ps program displays the currently-running processes. A related Unix utility named top provides a real-time view of the running processes.Examples
For example:
tux ~ # ps PID TTY TIME CMD 7431 pts/0 00:00:00 su 7434 pts/0 00:00:00 bash18585 pts/0 00:00:00 psUsers can also utilize the ps command in conjunction with the
grep command to find information about one process, such as its process id.An example of this is:tux ~ # ps -A | grep firefox-bin11778 ? 02:40:08 firefox-bin11779 ? 00:00:00 firefox-binOptions
ps has many options. On
operating system s that support the UNIX and POSIX standards, ps commonly runs with the options -ef, where "-e" selects every process and "-f" chooses the "full" output format. Another common option on these systems is -l, which specifies the "long" output format.Most systems derived from
BSD fail to accept the POSIX and UNIX standard options because of historical conflicts(for example, the "e" or "-e" option will cause the display ofenvironment variable s).On such systems, ps commonly runs with the non-standard options aux, where "a" lists all processes on a terminal, including those of other users, "x" lists all processes without controlling terminals and "u" adds the controlling user for each process. Note that, for maximum compatibility when using this syntax, there is no "-" in front of the "aux". Also you can add 'www' after aux, like "ps auxwww" for complete information about the process including all parameters.See also
*
tasklist
*top
*procps
*pstree
*pgrep
*List of Unix programs External links
* [http://www.opengroup.org/onlinepubs/009695399/utilities/ps.html ps] -- specification from the Single Unix Specification
*
* [http://www.linfo.org/ps.html The ps Command] - by The Linux Information Project (LINFO)
Wikimedia Foundation. 2010.