楼主#更多 发布于：2014-02-26 13:41
ps -ef | grep defunctzongming 2267 2238 0 09:41 ? 00:00:00 [lightdm-session] <defunct>
ps - report a snapshot of the current processes.
-e Select all processes. Identical to -A
-f Do full-format listing. This option can be combined with many other UNIX-style options to add additional columns. It also causes the command arguments to be printed. When used with -L, the NLWP (number of threads) and LWP (thread ID) columns will be added. See the c option, the format keyword args, and the format keyword comm.
ps stat 列状态示例， stat 列状态 (省略重复的列，非完整输出)
ps ax -o pid,ppid,stat,command
PID PPID STAT COMMAND
Select all processes except both session leaders (see getsid(2)) and processes not associated with a terminal.
Select by effective user ID (EUID) or name. This selects the processes whose effective user name or ID is in userlist.
The effective user ID describes the user whose file access permissions are used by the process (see geteuid(2)).
Identical to U and --user.
Lift the BSD-style "must have a tty" restriction, which is imposed upon the set of all processes when some BSD-style (without "-")
options are used or when the ps personality setting is BSD-like. The set of processes selected in this manner is in addition to the
set of processes selected by other means. An alternate description is that this option causes ps to list all processes owned by you
(same EUID as ps), or to list all processes when used together with the a option.
User-defined format. format is a single argument in the form of a blank-separated or comma-separated list, which offers a way to
specify individual output columns. The recognized keywords are described in the STANDARD FORMAT SPECIFIERS section below. Headers
may be renamed (ps -o pid,ruser=RealUser -o comm=Command) as desired.