Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
05-03-2012, 01:17 AM
|
#1
|
Member
Registered: Jun 2010
Location: India
Distribution: Fedora/Cent OS
Posts: 123
Rep:
|
How to find zombie process
How to find a zombie process and then the parent process of that zombie process, so that we can kill it
|
|
|
05-03-2012, 01:21 AM
|
#2
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,747
|
Hey guy,
I wrote your question in google "How to find zombie process" and opened the first link. You will find all the answers also...
|
|
|
05-03-2012, 01:21 AM
|
#3
|
LQ Veteran
Registered: Sep 2003
Posts: 10,532
|
Hi,
Quote:
Originally Posted by abhinav4
How to find a zombie process and then the parent process of that zombie process, so that we can kill it
|
In general: Zombie (defunct) processes cannot be killed, you need to reboot to get rid of them.
Most (if not all) of the time a zombie process has lost its "real" parent and is given to/handled by init (process no 1 or 0).
Have a look here: Zombie process
Hope this helps.
|
|
|
05-03-2012, 01:31 AM
|
#4
|
Member
Registered: Jun 2010
Location: India
Distribution: Fedora/Cent OS
Posts: 123
Original Poster
Rep:
|
Quote:
Originally Posted by pan64
Hey guy,
I wrote your question in google "How to find zombie process" and opened the first link. You will find all the answers also...
|
I know how to find a zombie process. What i am asking here is how to get the parent process of that zombie process.
Please read the message fully first.
|
|
|
05-03-2012, 01:35 AM
|
#5
|
Member
Registered: Jun 2010
Location: India
Distribution: Fedora/Cent OS
Posts: 123
Original Poster
Rep:
|
I can get the zombie process id by
ps aux
and then looking for z in STAT column. Now how do I get the parent process id corresponding to that id.
|
|
|
05-03-2012, 01:44 AM
|
#6
|
Senior Member
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,638
Rep:
|
Zombie is a child process that is lingering without its parent. As said you would not be able to find its parent as its already dead.
|
|
|
05-03-2012, 02:03 AM
|
#7
|
Member
Registered: Jun 2010
Location: India
Distribution: Fedora/Cent OS
Posts: 123
Original Poster
Rep:
|
Quote:
Originally Posted by linuxlover.chaitanya
Zombie is a child process that is lingering without its parent. As said you would not be able to find its parent as its already dead.
|
I think the process which is without parent is an orphan process not a zombie process. So zombie process does have a parent.
For reference.
http://www.linuxquestions.org/questi...rocess-794531/
|
|
|
05-03-2012, 02:23 AM
|
#8
|
Senior Member
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,638
Rep:
|
Sorry I went the other way. But as mentioned, kill command does not have effect on zombie as on normal process.
|
|
|
05-03-2012, 02:33 AM
|
#9
|
LQ Veteran
Registered: Sep 2003
Posts: 10,532
|
Hi,
Quote:
Originally Posted by abhinav4
So zombie process does have a parent.
|
Yes it does have a parent: init (pid 0 or 1), as mentioned in post #3.
|
|
|
05-03-2012, 02:35 AM
|
#10
|
Member
Registered: Jun 2010
Location: India
Distribution: Fedora/Cent OS
Posts: 123
Original Poster
Rep:
|
Ok lets take this in more simple way.
How can I get the "ppid" of ANY "pid". I am fetching the "pid" from "ps aux" and NOT "ps ef"
|
|
|
05-03-2012, 02:50 AM
|
#11
|
LQ Veteran
Registered: Sep 2003
Posts: 10,532
|
Hi,
Quote:
Originally Posted by abhinav4
How can I get the "ppid" of ANY "pid". I am fetching the "pid" from "ps aux" and NOT "ps ef"
|
ps aux doesn't include the parent pid (ppid), have a look at this:
Code:
ps axo pid,ppid,stat,comm
Column 1 -> PID
Column 2 -> PPID
Column 3 -> State
Column 4 -> Command
Hope this helps.
|
|
|
05-03-2012, 03:07 AM
|
#12
|
Member
Registered: Jun 2010
Location: India
Distribution: Fedora/Cent OS
Posts: 123
Original Poster
Rep:
|
This helped me. Thanks druuna
|
|
|
05-03-2012, 03:51 AM
|
#13
|
LQ Veteran
Registered: Sep 2003
Posts: 10,532
|
You're welcome
|
|
|
All times are GMT -5. The time now is 04:39 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|