- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- defunct processes
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-15-2003 03:29 AM
тАО09-15-2003 03:29 AM
We have a tool for oracle that creates many defunct processes when we had a network outage.
Because of that I wrote a simple script that does a "ps -ef | grep defunct | grep -v grep"
Now the funny thing is that you very often get an entry for defunct processes.
Please examin a :
while true
do
ps -ef | grep defunc | grep -v grep
done
Now log in via another terminal to the same server and see the output on your screen. What's happening, why does it seem that a process first gets a status of defunct before it dies ??
Am I the only one, or is this genereic ??
Regs David
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-15-2003 03:37 AM
тАО09-15-2003 03:37 AM
Re: defunct processes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-15-2003 03:39 AM
тАО09-15-2003 03:39 AM
Re: defunct processes
It is probably the fault of the shell script oracle provides for starting and stopping the application. Either that, or my changes caused it.
With regards to defunct processes, that behavior I've not seen. Thats something I'd have to go to the vendor for, because open processes have memory reserved and the resource drain could become substantial.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-15-2003 05:47 AM
тАО09-15-2003 05:47 AM
Re: defunct processes
It is possible to catch a few of them if you have them constantly happening, but it is a very short time that they normally spend in this state.
Abnormally, they will stay in this state and be permannent zombies if they cannot communicate with their parent and the parent has requested that they do this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-15-2003 06:03 AM
тАО09-15-2003 06:03 AM
Re: defunct processes
Thanks for your feedback.
Don't like this habbit. It's hard to create a script that checks for zombie processes now. Anyway, I just use the "wc -l" command in extension now, to check for more than 2 zombie processes.
Again thanks for your support.
Regs David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-16-2003 04:59 AM
тАО09-16-2003 04:59 AM
Re: defunct processes
ps -el |grep Z
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-17-2003 12:01 AM
тАО09-17-2003 12:01 AM
Re: defunct processes
Why do you grep for capital Z ?
Does "ps -e" show the process as being "ZOMBIE", or something? Unfortunetly I don't have a zombie process to check on right now.
Regs David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-17-2003 12:18 AM
тАО09-17-2003 12:18 AM
Re: defunct processes
what are you hoping to do with these zombies when you find them?
I you wont be able to kill them unless and it's good that you can't because in some instances an application will fail, or at least not work properly when it tries to issue a wait() on a process that it expects to be there. Also, if the process became a zombie as the result of it's parent dieing before the wait() then you will only get rid of it by re-booting.
It is worth noting that the only resource these things take up is some space in the process table and unless you are getting hundreds of them, they might be worth just leaving alone.
Just a few thoughts on the matter :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-17-2003 12:25 AM
тАО09-17-2003 12:25 AM
Re: defunct processes
Thanks for your time. However I do have a solution to kill a process that is initiating defuncts. Therefor I wrote a simple script to e-mail me whenever a defunct process shows up.
Regs David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-17-2003 02:09 AM
тАО09-17-2003 02:09 AM
Re: defunct processes
If in your script to check for defunct processes you store the defunct info you collect so:-
ps -ef | grep defunc | grep -v grep >/tmp/defunct_store
And the the next time you refer to this stored info to see if there is a real Zombie or you just caught an app clearing up.
HTH
Paula
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-17-2003 05:08 AM
тАО09-17-2003 05:08 AM
SolutionThis is a script I used to kill or report on zombies:
# Script to Kill Zombies
# Geoff Wild Jan 26, 1998
# kill ${i} commented out
#
# log file: /tmp/killzombies.log
logfile=/tmp/killzombies.log
if [ -f $logfile ];
then
rm $logfile
touch $logfile
else
touch $logfile
fi
#echo "/scripts/killzombies\n ">$logfile 2>&1
for i in `ps -el|grep -v SZ|grep Z|awk '{print $5}'`
do
ps -ef|grep -v grep|grep ${i} >>$logfile 2>&1
mailx -s "Check Zombie(s)" `cat /scripts/mailadmin.list` <$logfile
# kill -18 ${i}
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-17-2003 05:35 AM
тАО09-17-2003 05:35 AM
Re: defunct processes
I'll implement it the way you've shown me.
Sorry Paula, but don't like to use temp-files for checking on duplicates or not. If I realy have a zombie process, but a second process stopping will jump in on the first check and another stopping process will jump in on the second time, I have a problem.
I strongly prefer Geoff's implementation.
Regs David