linux 僵尸进程defunct ps auxf

来源:互联网 发布:php官方文档 编辑:程序博客网 时间:2024/05/22 01:29

当我们在程序中使用popen或者fopen时,容易出现僵尸进程。原因可能是没有fclose或者pclose,或者其他原因。

当我们ps auxf查看时,就能看到

如下

root     29587  0.0  0.0 117280  3580 ?        S    18:02   0:00 /bin/snmpd -c /conf/snmpd.conf
root     29622  0.0  0.0      0     0 ?        Z    18:02   0:00  \_ [sh] <defunct>
root     29639  0.0  0.0      0     0 ?        Z    18:02   0:00  \_ [sh] <defunct>
root     29644  0.0  0.0      0     0 ?        Z    18:02   0:00  \_ [sh] <defunct>
root     29647  0.0  0.0      0     0 ?        Z    18:02   0:00  \_ [sh] <defunct>
root     29652  0.0  0.0      0     0 ?        Z    18:02   0:00  \_ [sh] <defunct>
root     29739  0.0  0.0      0     0 ?        Z    18:03   0:00  \_ [sh] <defunct>
root     29767  0.0  0.0      0     0 ?        Z    18:03   0:00  \_ [sh] <defunct>
root     29772  0.0  0.0      0     0 ?        Z    18:03   0:00  \_ [sh] <defunct>

这是我们就可以知道这些僵尸进程是由snmp引起的 然后进行具体排查。


完!

原创粉丝点击