 in most unix-like operating systems, the ps program (short for "process status") displays the currently-running processes. a related unix utility named top provides a real-time view of the running processes. in windows powershell, ps is a predefined command alias for the get-process cmdlet which essentially serves the same purpose. ==examples== for example: # ps pid tty time cmd 7431 pts/0 00:00:00 su 7434 pts/0 00:00:00 bash 18585 pts/0 00:00:00 ps users can also utilize the ps command in conjunction with the grep (see the pgrep and pkill commands) command to find information about one process, such as its process id: $ # trying to find the pid of `firefox-bin` which is 2701 $ ps -a | grep firefox-bin 2701 ? 22:16:04 firefox-bin and the easier and non-racy version with pgrep: $ pgrep -l firefox-bin 2701 firefox-bin to see every process running as root in user format: # ps -u root -u user pid %cpu %mem vsz rss tt stat started time command root 1 0.0 0.0 9436 128 - ils sun00am 0:00.12 /sbin/init -- ==break down== {| class="wikitable" |- ! column header !! contents |- | %cpu || how much of the cpu the process is using |- | %mem || how much memory the process is using |- | addr || memory address of the process |- | c or cp || cpu usage and scheduling information |- | command* || name of the process, including arguments, if any |- | ni || nice value |- | f || flags |- | pid || process id number |- | ppid || id number of the processâ²s parent process |- | pri || priority of the process |- | rss || real memory usage |- | s or stat || process status code |- | start or stime || time when the process started |- | sz || virtual memory usage |- | time || total cpu usage |- | tt or tty || terminal associated with the process |- | uid or user || username of the processâ²s owner |- | wchan || memory address of the event the process is waiting for |} * = 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 cause the display of 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. note tha
Unix_SUS2008_utilities Unix_process_and_task_management-related_software