In UNIX and Linux Operating System, Zombie processes also known as defunct processes, are those which are still running after the complete execution of the process but it still remains in the process table. In this tutorial, we will learn how to check and kill Zombie processes in CentOS 8.
To view Zombie or Defunct processes open up the terminal and use the following command:
# ps aux | grep “defunct”
To view how many Zombie processes are running, you can use the following commands.
# ps aux | awk {'print $8'}|grep -c Z
# ps aux | awk '{ print $8 " " $2 }' | grep -wc Z
# ps aux | awk {'print $8'}|grep Z|wc -l To list down the process ID of the Zombie processes, use the following command:
# ps aux | awk '{ print $8 " " $2 }' | grep -w Z To kill the Zombie process use the following command with the process id, it will remove the Zombie process running on your server. For this use the following command.
# kill -9 <PID>
In this tutorial, we learned how to display the Zombie process and their process IDs and how to kill them.
Magento is a free and open-source e-commerce platform written in PHP. It is simple, easy…
ISPConfig is an open-source control panel that allows users to manage multiple servers from a…
As a Linux administrator, you may find it necessary to troubleshoot or test your Simple…
Ubuntu 24.04, like many modern Linux distributions, relies on the NetworkManager for managing network connections.…
Restic is a modern, open-source backup program designed for efficiency, security, and simplicity. It enables…
phpMyAdmin is a popular free tool written in PHP intended to administer MySQL and MariaDB…