Put your tips and tricks online - Share your knowledge! Login | Register
 
 
  Search     Advanced search
 

Home | Ask Question | Add tip | Questions | My tips | Recent tips & tricks | Suggest a category | FAQ | Forums

 
 
 
 Category : Home > Operating Systems > Unix     

Show parent processes for zombies


Use this script to display all processes related (parents and children) to zombie processes on
a Unix system. In this case processes are run by user oracle.

#!/bin/ksh

ZOMBIES=`ps -ef|grep oracle|grep 'defunct'|grep -v grep|awk '{printf("%s ", $2);}'`

if [ "X${ZOMBIES}" == "X" ] ; then

	echo "No zombies found"

else

	ptree ${ZOMBIES} | more

fi


The output may be something like:

4386  ora_qmnc_DBNAME
  20255 <defunct>
  19860 <defunct>
  5902  <defunct>
  8695  <defunct>
  29756 <defunct>
  23013 <defunct>
  21826 <defunct>
  8843  <defunct>
  10816 <defunct>


  Options
 
   del.icio.us  |  newsvine  |  digg  |  furl  |  google  |  yahoo  |  Ma.gnolia  |  vigillar  |  reddit  |  technorati  |  icerocket  |  pubsub

       Rate this tip:    

Start discussion or add comment to this tip

  Details
Tip reference : #93
views : 762
Added on : 04/05/06
Submited by : h8dk97
 
Send a message Send a message Printer friendly output Printer friendly output
Display this member's tips Display this member's tips (156)
 
 
<< Previous Next >>
 Most viewed tips 
  Databases > Oracle > Security : How to unlock Oracle user account  
  Databases > Oracle > Performance Tuning : How to enable trace in Oracle  
  Databases > Oracle : Kill user session  
  Operating Systems > Unix : How to kill Unix user session  
   
  All categories
Databases | Programming | Hardware | Operating Systems | Networking | Internet | ERP / CRM | Games & Multimedia | Graphics & Design | Miscellaneous | Office Software | TipLib FAQ
 
 

Home |  FAQ |  Terms of Use |  Privacy Policy

© 2005 tiplib.com