周五 3 九 2010
ps aux 中STAT 解释及如何查看僵死进程
Posted by Jansfer under 技术
No Comments
运行 ps aux 的到如下信息:
ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
smmsp 3521 0.0 0.7 6556 1616 ? Ss 20:40 0:00 sendmail: Queue runner@01:00:00 f
root 3532 0.0 0.2 2428 452 ? Ss 20:40 0:00 gpm -m /dev/input/mice -t imps2
htt 3563 0.0 0.0 2956 196 ? Ss 20:41 0:00 /usr/sbin/htt -retryonerror 0
htt 3564 0.0 1.7 29460 3704 ? Sl 20:41 0:00 htt_server -nodaemon
root 3574 0.0 0.4 5236 992 ? Ss 20:41 0:00 crond
xfs 3617 0.0 1.3 13572 2804 ? Ss 20:41 0:00 xfs -droppriv -daemon
root 3627 0.0 0.2 3448 552 ? SNs 20:41 0:00 anacron -s
root 3636 0.0 0.1 2304 420 ? Ss 20:41 0:00 /usr/sbin/atd
dbus 3655 0.0 0.5 13840 1084 ? Ssl 20:41 0:00 dbus-daemon-1 –system
………………………………
stat 中的参数意义如下:
D 不可中断 Uninterruptible(usually IO)
R 正在运行,或在队列中的进程
S 处于休眠状态
T 停止或被追踪
Z 僵尸进程
W 进入内存交换(从内核2.6开始无效)
X 死掉的进程
< 高优先级
n 低优先级
s 包含子进程
+ 位于后台的进程组
查看僵死进程方法:
# ps aux | awk '{ print $8 " " $2 }' | grep -w Z
想Kill掉这些进程,执行:
ps aux | awk '{ print $8 " " $2 }' | grep -w Z|awk '{print $2}' | xargs -L 1 sudo kill -9
Today on history:
- 2011: Nginx中的gzip模块简介(0)
- 2011: [原]Eclipse安装pdt方法(0)
- 2009: 重磅出击,BBSMAX4.0正式版本空袭(0)
- 2008: 一些不愿意看到的事情(0)
- 2008: 厦门互联网站长群英会隆重召开 (0)
No Responses to “ ps aux 中STAT 解释及如何查看僵死进程 ”