[root@carschina ~]# ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0   2076   620 ?        Ss    2010   0:01 init [3]                 
root         2  0.0  0.0      0     0 ?        S<    2010   0:00 [migration/0]
root         3  0.0  0.0      0     0 ?        SN    2010   0:01 [ksoftirqd/0]
root         4  0.0  0.0      0     0 ?        S<    2010   0:00 [watchdog/0]
root         5  0.0  0.0      0     0 ?        S<    2010   0:00 [migration/1]
root         6  0.0  0.0      0     0 ?        SN    2010   0:02 [ksoftirqd/1]
root       524  0.0  0.0      0     0 ?        S<    2010   0:01 [kauditd]
root       558  0.0  0.0   2444   884 ?        S<s   2010   0:00 /sbin/udevd -d
root       680  0.0  0.1  26504  5784 ?        Sl   Jan09  12:35 /usr/sbin/snmpd -Lsd -Lf /dev/null -p /var/run/snmpd.pid -a
root      1181  0.0  0.0      0     0 ?        S<    2010   0:00 [kedac]
root      1709  0.0  0.0      0     0 ?        S<    2010   3:19 [kjournald]
www       1977  0.0  0.6  58352 24904 ?        S    Feb10   0:04 /usr/local/php/bin/php-cgi
stat 中的参数意义如下:
   D 不可中断 Uninterruptible(usually IO)
   R 正在运行,或在队列中的进程
   S 处于休眠状态
   T 停止或被追踪
   Z 僵尸进程
   W 进入内存交换(从内核2.6开始无效)
   X   死掉的进程

    < 高优先级
    n   低优先级
    s   包含子进程
    +   位于后台的进程组

 

linux上进程有5种状态:
1. 运行(正在运行或在运行队列中等待)
2. 中断(休眠中, 受阻, 在等待某个条件的形成或接受到信号)
3. 不可中断(收到信号不唤醒和不可运行, 进程必须等待直到有中断发生)
4. 僵死(进程已终止, 但进程描述符存在, 直到父进程调用wait4()系统调用后释放)
5. 停止(进程收到SIGSTOP, SIGSTP, SIGTIN, SIGTOU信号后停止运行运行)

ps工具标识进程的5种状态码:
D 不可中断 uninterruptible sleep (usually IO)
R 运行 runnable (on run queue)
S 中断 sleeping
T 停止 traced or stopped
Z 僵死 a defunct (”zombie”) process

注: 其它状态还包括W(无驻留页), <(高优先级进程), N(低优先级进程), L(内存锁页).