The PS command is used to list the processes currently running on the system. Use this command to determine which processes are running and running, whether the process is complete, if the process is dead, which processes are consuming too many resources, and so on
There are 5 types of processes on Linux: 1. Running (running or waiting in the running queue) 2. Interrupts (dormant, blocked, waiting for a condition to form or receive to signal) 3. Non-interruptible (the received signal does not wake up and is not operational, the process must wait until there is an outage) 4. Zombie (The process has been terminated, but the process descriptor exists until the parent process calls WAIT4 () after the system call is released) 5. Stop (process received Sigstop, SIGSTP, Sigtin, stop running after Sigtou signal) PS tool identifies 5 status codes for the process: D non-interruptible uninterruptible sleep (usually IO) R run runnable ( On run queue) S interrupt sleeping T stop traced or stopped Z zombie a defunct ("zombie") process
Example 1 shows all processes
Ps-a
Example 2 shows the process for the specified user
Ps-u Root
Example 3 shows all process information
Ps-ef
Example 4 output specified result
Ps-o Pid,ppid,pgrp,session,tpgid,comm
Reference Documentation:
Http://www.cnblogs.com/peida/archive/2012/12/19/2824418.html
Linux Command--ps command