LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-07-2010, 03:25 AM   #1
junust
Member
 
Registered: Jul 2008
Location: Israel Ramat Gan
Distribution: CentOs 5.3, SuSe 11.1, Solaris 9, Slackware 13
Posts: 81

Rep: Reputation: 15
zombie process via 'top' command is not visible


Hello,
I got indication of zombie process via top command
Code:
Tasks: 321 total,   1 running, 319 sleeping,   0 stopped,   1 zombie
BUT

I don't have 'Z' indication on 'Status' column

How could it possible to identify this process ?

Thx

Last edited by junust; 04-07-2010 at 03:27 AM.
 
Old 04-07-2010, 03:44 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi,

Maybe it's not shown because top doesn't list all on the screen. You can toggle ordering by status by pressing the 'w' character. Try that and see if the Z gets listed. Otherwise you can try using ps -aux which also shows the status of a process.

Kind regards,

Eric
 
Old 04-07-2010, 04:29 AM   #3
junust
Member
 
Registered: Jul 2008
Location: Israel Ramat Gan
Distribution: CentOs 5.3, SuSe 11.1, Solaris 9, Slackware 13
Posts: 81

Original Poster
Rep: Reputation: 15
Actually, my problem was '-w Z' option on GREPing process


Code:
ps auxw | awk '{ print $8 " " $2 }' | grep -w Z
cause it look like
Code:
Zs 27844
But this was really helpful for me
Quote:
sometimes zombie processes have the string <defunct> at the end in the output of top
Code:
ps auxw | grep defunct

oracle  27844  0.1  0.0  0   0 ? Zs    Mar29  21:49 [oracle]<defunct>

Last edited by junust; 04-07-2010 at 04:33 AM.
 
Old 04-07-2010, 04:37 AM   #4
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

Correct! Below a quote from an article on TuxRadar.com:

Quote:
A defunct process is one that was started by another process (the parent), but has finished without the parent waiting for completion.
This can happen if the parent process has hung or crashed.

Defunct processes are also known as zombies, and listed with a 'Z' status in the output from ps. They're not quite as destructive as the living dead, as they consume almost no system resources, but on a system that's always turned on, such as a server, they can become equally distracting. The key to killing a defunct process is to first kill the parent, which will be listed in the output of ps with the addition of -l for long output. Parent processes can be identified under the PPID column, as opposed to the PID column for the process ID. These are identifiers attached to each process running on your system. They can be killed using another common shell command, kill -9, followed by the PPID. Obviously this will stop the parent task, so first make sure it's not essential. Once the parent process has been killed, the system init process should send the correct signal to the defunct process, which should terminate automatically.
Kind regards,

Eric
 
Old 04-07-2010, 06:16 AM   #5
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
A little note: with ps you can choose the information to retrieve from processes using the -o option. In this way it's easy to parse them based on your needs. For example:
Code:
$ ps -eo pid,state,comm | awk '$2 == "Z"'
27844 Z oracle
 
Old 04-07-2010, 08:55 AM   #6
junust
Member
 
Registered: Jul 2008
Location: Israel Ramat Gan
Distribution: CentOs 5.3, SuSe 11.1, Solaris 9, Slackware 13
Posts: 81

Original Poster
Rep: Reputation: 15
Good to know, thanks to all
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
TOP -- Zombie shivanrathore Linux - Security 6 03-12-2009 04:36 AM
Zombie Process N|k0N Linux - Security 8 09-22-2007 02:01 AM
Top reports 1 zombie - which one? Yalla-One Slackware 2 08-06-2006 01:14 PM
top command ram problem displaying negative value for process xekhz Linux - General 1 06-10-2006 03:01 AM
zombie process ihatecomputers Linux - Software 2 03-24-2005 07:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration