LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Kill a zombie process - which process is the parent that I should kill? (https://www.linuxquestions.org/questions/linux-general-1/kill-a-zombie-process-which-process-is-the-parent-that-i-should-kill-921399/)

Mountain 12-31-2011 12:36 PM

Kill a zombie process - which process is the parent that I should kill?
 
I need to kill this zombie process without rebooting or logging out (or killing X):

$ ps u p 17478
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
1000 17478 0.0 0.0 0 0 ? Zs Dec22 0:01 [ssh] <defunct>

Which process is the parent that I should try to kill?
1681 17314 17314 17314 tty7 17314 Ss+ 0 150:26 \_ /usr/bin/X :0 -auth
1681 17428 17428 17428 ? -1 Ssl 1000 0:04 \_ /usr/bin/gnome-sess
17428 17478 17478 17478 ? -1 Zs 1000 0:01 \_ [ssh] <defunct>

It looks like the parent might be something I can't kill... but I'm not 100% sure what I'm looking at.

$ ps u p 1681
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1681 0.0 0.0 189796 2660 ? Ssl Dec22 0:00 lightdm

$ ps u p 17314
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 17314 1.2 1.6 392452 267228 tty7 Ss+ Dec22 150:37 /usr/bin/X :0 -

honeybadger 12-31-2011 01:16 PM

I am not sure but try killing 17478. The rest of the processes are by root so you cannot kill them anyway :). You should have top installed - try running that it is more descriptive than ps. Personally I use htop for situations like these. Also try 'pkill ssh' this can be used to kill a process by name. To get more information on a process you can also use lsof or fuser.
Hope this helps.

Mountain 12-31-2011 01:18 PM

Quote:

Originally Posted by honeybadger (Post 4562671)
I am not sure but try killing 17478. The rest of the processes are by root so you cannot kill them anyway :). You should have top installed - try running that it is more descriptive than ps. Personally I use htop for situations like these. Also try 'pkill ssh' this can be used to kill a process by name. To get more information on a process you can also use lsof or fuser.
Hope this helps.

I already tried all of that. I can't kill 17478 because it is a zombie. I also tried killing it as root user, but that didn't work either.

flamelord 12-31-2011 02:44 PM

have you tried using the -9 option?


All times are GMT -5. The time now is 10:44 PM.