- Source: Ps (Unix)
In most Unix and Unix-like operating systems, the ps (process status) program displays the currently-running processes. The related Unix utility top provides a real-time view of the running processes.
Implementations
KolibriOS includes an implementation of the ps command. The ps command has also been ported to the IBM i operating system. In Windows PowerShell, ps is a predefined command alias for the Get-Process cmdlet, which essentially serves the same purpose.
Examples
Users can pipeline ps with other commands, such as less to view the process status output one page at a time:
Users can also utilize the ps command in conjunction with the grep command (see the pgrep and pkill commands) to find information about a single process, such as its id:
The use of pgrep simplifies the syntax and avoids potential race conditions:
To see every process running as root in user format:
Header line
* = Often abbreviated
Options
ps has many options. On operating systems that support the SUS 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 SUS and POSIX standard options because of historical conflicts. (For example, the "e" or "-e" option will display environment variables.) 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 a column for the controlling user for each process. For maximum compatibility, there is no "-" in front of the "aux". "ps auxww" provides complete information about the process, including all parameters.
See also
Task manager
kill (command)
List of Unix commands
nmon – a system monitor tool for AIX and Linux operating systems
pstree (Unix)
lsof
References
Further reading
McElhearn, Kirk (2006). The Mac OS X Command Line: Unix Under the Hood. John Wiley & Sons. ISBN 978-0470113851.
Shotts (Jr), William E. (2012). The Linux Command Line: A Complete Introduction. No Starch Press. pp. 96–98. ISBN 9781593273897. Retrieved 16 October 2017.
External links
ps – Shell and Utilities Reference, The Single UNIX Specification, Version 4 from The Open Group
ps(1) – Plan 9 Programmer's Manual, Volume 1
ps(1) – Inferno General commands Manual
Show all running processes in Linux using ps command
In Unix, what do the output fields of the ps command mean?
Kata Kunci Pencarian:
- IBM PS/2
- IBM AIX
- Daftar perintah Unix
- Paket protokol internet
- MINIX
- AR
- Pengidentifikasi Keamanan
- Encapsulated PostScript
- ReactOS
- PlayStation 3
- Ps (Unix)
- PS
- Kill (command)
- IBM AIX
- Shebang (Unix)
- Nice (Unix)
- List of POSIX commands
- Process state
- IBM PS/2
- Research Unix