LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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
 
LinkBack Search this Thread
Old 04-07-2010, 04:25 AM   #1
junust
Member
 
Registered: Jul 2008
Location: Israel Ramat Gan
Distribution: CentOs 5.3, SuSe 11.1, Solaris 9, Slackware 13
Posts: 78

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 04:27 AM.
 
Old 04-07-2010, 04:44 AM   #2
EricTRA
Guru
 
Registered: May 2009
Location: Barcelona, Spain
Distribution: LMDE + Linux 3.2.0-1.dmz.6-amd64, RHEL5+6, Mulltiple testing
Posts: 6,174
Blog Entries: 1

Rep: Reputation: 1147Reputation: 1147Reputation: 1147Reputation: 1147Reputation: 1147Reputation: 1147Reputation: 1147Reputation: 1147Reputation: 1147
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, 05:29 AM   #3
junust
Member
 
Registered: Jul 2008
Location: Israel Ramat Gan
Distribution: CentOs 5.3, SuSe 11.1, Solaris 9, Slackware 13
Posts: 78

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 05:33 AM.
 
Old 04-07-2010, 05:37 AM   #4
EricTRA
Guru
 
Registered: May 2009
Location: Barcelona, Spain
Distribution: LMDE + Linux 3.2.0-1.dmz.6-amd64, RHEL5+6, Mulltiple testing
Posts: 6,174
Blog Entries: 1

Rep: Reputation: 1147Reputation: 1147Reputation: 1147Reputation: 1147Reputation: 1147Reputation: 1147Reputation: 1147Reputation: 1147Reputation: 1147
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, 07:16 AM   #5
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: OpenSUSE 12.1 CentOS 6.2
Posts: 8,417

Rep: Reputation: 1153Reputation: 1153Reputation: 1153Reputation: 1153Reputation: 1153Reputation: 1153Reputation: 1153Reputation: 1153Reputation: 1153
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, 09:55 AM   #6
junust
Member
 
Registered: Jul 2008
Location: Israel Ramat Gan
Distribution: CentOs 5.3, SuSe 11.1, Solaris 9, Slackware 13
Posts: 78

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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


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

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration