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>
|