Mailing me the Defunct/Zombie/Orphan


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Mailing me the Defunct/Zombie/Orphan
# 1  
Old 11-26-2009
Mailing me the Defunct/Zombie/Orphan

Hello I need a script which would mail me the list of processes which are zombie/defunct or orphan.

Please help me in this regard.
# 2  
Old 11-26-2009
As a start you should do a ps, grep what you are looking for and pipe it into the mail command. Write it as a small script and let it be fired by cron to your needs.
# 3  
Old 11-26-2009
how to figure out which processes are zombie/orphan/defunct out of a 'ps -ef' output

Thanks in advance!!
# 4  
Old 11-26-2009
Something like this? (code is not tested)

Code:
count=`ps -ef |grep defunct |wc -l`
if [ $count > 10 ] ; then 
  echo " defunct process `ps -ef |grep defunct`" |mailx -s "defunct process" yourmailbox@abc.com
fi

# 5  
Old 11-26-2009
thanks a lot .... how do i identify the zombie and orphan processes as well through a 'ps -ef' output.

thanks in advance!!
# 6  
Old 11-26-2009
Check rdcwayx's code - he is grep'ing for "defunct" in the output of ps.
# 7  
Old 11-26-2009
check for the status of 'Z' in ps output for zombie process
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Is orphan process handling by Solaris os and Linux os same?

In solaris, orphan process is put to sleep mode and does not consume any CPU resources. In Linux, orphan process is kept in running state consuming all CPU and Ram resources. Is it the case? Is there a difference on how these operating systems will handle orphan processes? The route cause of... (10 Replies)
Discussion started by: Belure Pooja B
10 Replies

2. Emergency UNIX and Linux Support

Script for deleting orphan ids & unknown gecos

The AIX servers that I am working on have been identified as having orphaned user ids & improper gecos for some user ids. Can someone help me with a script to delete the user ids if the orphaned ids are provided in a text file. The home directory set up for the user ids happen to be the... (1 Reply)
Discussion started by: ggayathri
1 Replies

3. UNIX for Advanced & Expert Users

cronjobs orphan processes

Our cron job stats its started on Oct20 % ps -ef | grep cron root 1442044 1 0 Oct 20 - 25:23 /usr/sbin/cron All the below jobs aixmf,aixgh are triggered from cron only. user pid ppid date time cmd gaix 1581282 1 35 16:33:01 - 20:56... (1 Reply)
Discussion started by: karnan
1 Replies

4. UNIX for Advanced & Expert Users

defunct processes?

HiI had a tool fail recently, on analysis I found it was cleaning up orphaned directories that had been created by specific processes that had died for some reason, thus failing to clean up after themselves.The directories were of the form /dir.pid. The tool would look to see if any instances of... (2 Replies)
Discussion started by: steadyonabix
2 Replies

5. UNIX Desktop Questions & Answers

orphan soft linked files

How can we find files that were soft linked to an original file and then the original has been deleted. these soft linked files won't then be accessible. How can we find orphan linked files? Thanks, (3 Replies)
Discussion started by: Pouchie1
3 Replies

6. Linux

Cron ORPHAN (no passwd entry)

I am using the standard vixie-cron am seeing the following my logs : crond: (username) ORPHAN (no passwd entry) Ordinarily this is a simple matter, there is no corresponding user, but I am using central authentication and the username does exist and is usable via the standard nsswitch mechanism, so... (2 Replies)
Discussion started by: humbletech99
2 Replies

7. UNIX for Dummies Questions & Answers

whats the difference between zombie orpha and defunct processes

can some one please explain zombie orphan defunct and how they r related (3 Replies)
Discussion started by: pbsrinivas
3 Replies

8. UNIX for Advanced & Expert Users

how to remove db2 orphan processes

Hi Guys, I'm working on a AIX 5.3 environment and I've been quite a few times in a situation where we can remove db2 orphan processes therefore our only alternative has been to reboot the entire server. Now I wonder is there is any other possible way that we can use to remove those processes... (5 Replies)
Discussion started by: hariza
5 Replies

9. Programming

defunct process!!

how can i assure that daemon process which is being run as init child,can be removed immediately from system when it goes defunct or to avoid daemon process becoming defunt? (5 Replies)
Discussion started by: rish2005
5 Replies

10. Shell Programming and Scripting

Script to kill stranded/orphan process by users.

I have customers on our AIX/UNIX node startup a process that becomes stranded or orphaned and must be killed. I would like to create a script to check for these orphan processes and kill them. I can have cron run this job. The customers process will run and after 24 hours time out leaving an... (4 Replies)
Discussion started by: rjohnson
4 Replies
Login or Register to Ask a Question