Sam*_*nga 12 linux process kill zombie-process
有 5 个进程不能被杀死kill -9 $PID
,执行cat /proc/$PID/cmdline
将挂起当前会话。也许它们是僵尸进程。
执行ps -ef or htop
也会挂起当前会话。但是top
并且ps -e
工作正常。
所以看起来文件系统没有响应有两个问题。
这是一台运行虚拟机的生产机器,因此无法重新启动。
以下进程 ID 不起作用:16181 16765 5985 7427 7547
这些进程的父进程是 init
??collectd(16765)???{collectd}(16776)
? ??{collectd}(16777)
? ??{collectd}(16778)
? ??{collectd}(16779)
? ??{collectd}(16780)
? ??{collectd}(16781)
??collectd(28642)???{collectd}(28650)
??collectd(29868)???{collectd}(29873)
? ??{collectd}(29874)
? ??{collectd}(29875)
? ??{collectd}(29876)
Run Code Online (Sandbox Code Playgroud)
并且 qemu 进程之一不起作用
|-qemu-system-x86(16181)-+-{qemu-system-x86}(16232)
| |-{qemu-system-x86}(16238)
| |-{qemu-system-x86}(16803)
| |-{qemu-system-x86}(17990)
| |-{qemu-system-x86}(17991)
| |-{qemu-system-x86}(17992)
| |-{qemu-system-x86}(18062)
| |-{qemu-system-x86}(18066)
| |-{qemu-system-x86}(18072)
| |-{qemu-system-x86}(18073)
| |-{qemu-system-x86}(18074)
| |-{qemu-system-x86}(18078)
| |-{qemu-system-x86}(18079)
| |-{qemu-system-x86}(18086)
| |-{qemu-system-x86}(18088)
| |-{qemu-system-x86}(18092)
| |-{qemu-system-x86}(18107)
| |-{qemu-system-x86}(18108)
| |-{qemu-system-x86}(18111)
| |-{qemu-system-x86}(18113)
| |-{qemu-system-x86}(18114)
| |-{qemu-system-x86}(18119)
| |-{qemu-system-x86}(23147)
| `-{qemu-system-x86}(27051)
Run Code Online (Sandbox Code Playgroud)
Gil*_*il' 24
你没有僵尸。cat /proc/$PID/cmdline
僵尸不会有任何问题。如果kill -9
没有杀死程序,则说明程序正在进行一些不间断的 I/O 操作。这通常表示以下三件事之一:
实用程序ps
可能会挂起,如果它们尝试读取某些信息,例如内核由于上述原因之一未提供的进程可执行路径。
尝试cat /proc/16181/syscall
查看进程 16181 在做什么。这可能会或可能不会起作用,具体取决于您的系统走了多远。
如果问题出在网络文件系统上,您可以强制卸载它,或使其联机。如果问题是内核或硬件错误,您可以做什么取决于错误的性质。强烈建议重新启动(并升级到固定内核,或更换损坏的硬件)。
你只能通过杀死它的父母来杀死僵尸。僵尸进程已释放其所有资源,并正在等待其父进程获取其退出状态。wait
当父进程不执行 a来获取子进程的退出状态时,它就会变成僵尸。当你杀死僵尸的父母时,init
获得退出状态,僵尸最终死亡。