How to identify and kill zombie process in Linux ?

If you already knows whats zombie process and wanted to identify all zombie process’s in you system, you can directly proceed ahead but if you don’t know, we may suggest you first read the article, “What is Zombie process and How to create zombie process in Linux ?”

Lets consider, now you have created the zombie process purposefully, and want to identify what are its details, type below command,

 $ ps -aux | grep defunct 

This will give you all existing zombie process in your system ( which will also include our purposefully created “our_zombie_child” ) as,

$ ps -aux | grep defunct
root      1303  0.0  0.0      0     0 ?        ZN   14:01   0:00 [bandwidthd] 
myuser    4496  0.0  0.0      0     0 pts/3    Z+   14:37   0:00 [our_zombie_chil] 

Now, you can also check what is the parent process of this child as, [ Note: 4496 is pid of child ]

$ pstree -p -s 4496
systemd(1)───lightdm(1235)───lightdm(1742)───upstart(1978)───gnome-terminal-(4423)───bash(4430)───our_zombie_chil(+

This will give the complete process tree of the defunct child.

Related :   How to block unwanted websites using your router in a home wifi network ?

Now, if you want to kill the zombie process, we can use the “kill” command along with its pid as,

$ sudo kill -9 4496

lynxbee_ezoic

Subscribe with Valid Email Id to receive updates in Inbox. ( Secured by Google FeedBurner )

   


Leave a Comment

Android Android Applications Android Build system Android Commands Application Libraries Application Stack / User Interface Bash / Shell Scripts Bluetooth driver Cloud Technologies Commands and Packages Compilation Content Management System Core Kernel C Programs Development & Build Development, Debugging and Performance Tools Development Environment Setup Django & REST Api Errors & Failures Git Hardware Platforms HTML JAVA Programs Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL Multimedia Audio, Video, Images NDK / Middleware / HAL OS Concepts PHP Programming Languages Scripting and Automation Search Engine Optimisation ( SEO ) Social Media Source Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized Web design and development Website Hosting Wordpress Yocto / Bitbake / Openembedded