Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Centos system kills zombie process

2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Ps-A-o stat,ppid,pid,cmd | grep-e'^ [Zz]'| awk'{print $2}'| xargs kill-9

Locate the zombie process and the parent of the zombie process

Ps-A-ostat,ppid,pid,cmd | grep-e'^ [Zz]'

Use the Kill-HUP zombie process ID to kill the zombie process. Often, this situation cannot kill the zombie process, so you need to kill the parent process of the zombie process.

Kill-HUP zombie process parent ID

Then use the above statement to query whether the zombie process has been killed

Ps-A-ostat,ppid,pid,cmd | grep-e'^ [Zz]'

Parameter interpretation

The-A parameter lists all processes

-o Custom output fields stat (status), ppid (process parent id), pid (process id), cmd (command)

Because the process with state z or Z is a zombie process, we use grep to grab the stat state as the zZ process

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report