<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic defunct processes in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/defunct-processes/m-p/3071019#M140684</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;We have a tool for oracle that creates many defunct processes when we had a network outage.&lt;BR /&gt;&lt;BR /&gt;Because of that I wrote a simple script that does a "ps -ef | grep defunct | grep -v grep"&lt;BR /&gt;Now the funny thing is that you very often get an entry for defunct processes.&lt;BR /&gt;&lt;BR /&gt;Please examin a :&lt;BR /&gt;&lt;BR /&gt;while true&lt;BR /&gt;do&lt;BR /&gt;ps -ef | grep defunc | grep -v grep&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;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 ??&lt;BR /&gt;&lt;BR /&gt;Am I the only one, or is this genereic ??&lt;BR /&gt;&lt;BR /&gt;Regs David</description>
    <pubDate>Mon, 15 Sep 2003 10:29:14 GMT</pubDate>
    <dc:creator>David_246</dc:creator>
    <dc:date>2003-09-15T10:29:14Z</dc:date>
    <item>
      <title>defunct processes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/defunct-processes/m-p/3071019#M140684</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;We have a tool for oracle that creates many defunct processes when we had a network outage.&lt;BR /&gt;&lt;BR /&gt;Because of that I wrote a simple script that does a "ps -ef | grep defunct | grep -v grep"&lt;BR /&gt;Now the funny thing is that you very often get an entry for defunct processes.&lt;BR /&gt;&lt;BR /&gt;Please examin a :&lt;BR /&gt;&lt;BR /&gt;while true&lt;BR /&gt;do&lt;BR /&gt;ps -ef | grep defunc | grep -v grep&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;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 ??&lt;BR /&gt;&lt;BR /&gt;Am I the only one, or is this genereic ??&lt;BR /&gt;&lt;BR /&gt;Regs David</description>
      <pubDate>Mon, 15 Sep 2003 10:29:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/defunct-processes/m-p/3071019#M140684</guid>
      <dc:creator>David_246</dc:creator>
      <dc:date>2003-09-15T10:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: defunct processes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/defunct-processes/m-p/3071020#M140685</link>
      <description>Process are defunt while waiting for the parent to do a wait() or waitpid().  Thet are affectionately referred to as zombies.  So, for a short time, all processes that die are defunct but most of the time they get cleaned up by the parent.</description>
      <pubDate>Mon, 15 Sep 2003 10:37:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/defunct-processes/m-p/3071020#M140685</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2003-09-15T10:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: defunct processes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/defunct-processes/m-p/3071021#M140686</link>
      <description>I have noticed that when I stop and start certain Oracle applications, logging messages that should be going to a file somewhere go to the screen of that terminal session.&lt;BR /&gt;&lt;BR /&gt;It is probably the fault of the shell script oracle provides for starting and stopping the application.  Either that, or my changes caused it.  &lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Mon, 15 Sep 2003 10:39:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/defunct-processes/m-p/3071021#M140686</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-09-15T10:39:05Z</dc:date>
    </item>
    <item>
      <title>Re: defunct processes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/defunct-processes/m-p/3071022#M140687</link>
      <description>All processes go thru the defunct or zombie stage while they are terminating and being cleaned up by the operating system.&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;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.</description>
      <pubDate>Mon, 15 Sep 2003 12:47:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/defunct-processes/m-p/3071022#M140687</guid>
      <dc:creator>John Bolene</dc:creator>
      <dc:date>2003-09-15T12:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: defunct processes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/defunct-processes/m-p/3071023#M140688</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Thanks for your feedback.&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;Again thanks for your support.&lt;BR /&gt;&lt;BR /&gt;Regs David</description>
      <pubDate>Mon, 15 Sep 2003 13:03:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/defunct-processes/m-p/3071023#M140688</guid>
      <dc:creator>David_246</dc:creator>
      <dc:date>2003-09-15T13:03:05Z</dc:date>
    </item>
    <item>
      <title>Re: defunct processes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/defunct-processes/m-p/3071024#M140689</link>
      <description>Have you tried?&lt;BR /&gt;&lt;BR /&gt;ps -el |grep Z&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 16 Sep 2003 11:59:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/defunct-processes/m-p/3071024#M140689</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2003-09-16T11:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: defunct processes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/defunct-processes/m-p/3071025#M140690</link>
      <description>Hi Geoff,&lt;BR /&gt;&lt;BR /&gt;Why do you grep for capital Z ?&lt;BR /&gt;Does "ps -e" show the process as being "ZOMBIE", or something? Unfortunetly I don't have a zombie process to check on right now.&lt;BR /&gt;&lt;BR /&gt;Regs David</description>
      <pubDate>Wed, 17 Sep 2003 07:01:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/defunct-processes/m-p/3071025#M140690</guid>
      <dc:creator>David_246</dc:creator>
      <dc:date>2003-09-17T07:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: defunct processes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/defunct-processes/m-p/3071026#M140691</link>
      <description>David,&lt;BR /&gt;&lt;BR /&gt;what are you hoping to do with these zombies when you find them?&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;Just a few thoughts on the matter :)</description>
      <pubDate>Wed, 17 Sep 2003 07:18:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/defunct-processes/m-p/3071026#M140691</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2003-09-17T07:18:20Z</dc:date>
    </item>
    <item>
      <title>Re: defunct processes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/defunct-processes/m-p/3071027#M140692</link>
      <description>Hi Mark,&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;Regs David</description>
      <pubDate>Wed, 17 Sep 2003 07:25:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/defunct-processes/m-p/3071027#M140692</guid>
      <dc:creator>David_246</dc:creator>
      <dc:date>2003-09-17T07:25:00Z</dc:date>
    </item>
    <item>
      <title>Re: defunct processes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/defunct-processes/m-p/3071028#M140693</link>
      <description>David&lt;BR /&gt;&lt;BR /&gt;If in your script to check for defunct processes you store the defunct info you collect so:-&lt;BR /&gt;&lt;BR /&gt;ps -ef | grep defunc | grep -v grep &amp;gt;/tmp/defunct_store&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Paula</description>
      <pubDate>Wed, 17 Sep 2003 09:09:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/defunct-processes/m-p/3071028#M140693</guid>
      <dc:creator>Paula J Frazer-Campbell</dc:creator>
      <dc:date>2003-09-17T09:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: defunct processes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/defunct-processes/m-p/3071029#M140694</link>
      <description>Yes, ps -el |grep Z shows zombies...&lt;BR /&gt;&lt;BR /&gt;This is a script I used to kill or report on zombies:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# Script to Kill Zombies&lt;BR /&gt;# Geoff Wild Jan 26, 1998&lt;BR /&gt;# kill ${i} commented out&lt;BR /&gt;#&lt;BR /&gt;# log file: /tmp/killzombies.log&lt;BR /&gt;logfile=/tmp/killzombies.log&lt;BR /&gt;if [ -f $logfile ];&lt;BR /&gt;then&lt;BR /&gt;        rm $logfile&lt;BR /&gt;        touch $logfile&lt;BR /&gt;else&lt;BR /&gt;        touch $logfile&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;#echo "/scripts/killzombies\n "&amp;gt;$logfile 2&amp;gt;&amp;amp;1&lt;BR /&gt;for i in `ps -el|grep -v SZ|grep Z|awk '{print $5}'`&lt;BR /&gt;do&lt;BR /&gt;        ps -ef|grep -v grep|grep ${i} &amp;gt;&amp;gt;$logfile 2&amp;gt;&amp;amp;1&lt;BR /&gt;        mailx -s "Check Zombie(s)" `cat /scripts/mailadmin.list` &amp;lt;$logfile&lt;BR /&gt;#       kill -18 ${i}&lt;BR /&gt;done&lt;BR /&gt;</description>
      <pubDate>Wed, 17 Sep 2003 12:08:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/defunct-processes/m-p/3071029#M140694</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2003-09-17T12:08:39Z</dc:date>
    </item>
    <item>
      <title>Re: defunct processes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/defunct-processes/m-p/3071030#M140695</link>
      <description>Great work Geoff !!!&lt;BR /&gt;&lt;BR /&gt;I'll implement it the way you've shown me.&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;I strongly prefer Geoff's implementation.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regs David&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 17 Sep 2003 12:35:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/defunct-processes/m-p/3071030#M140695</guid>
      <dc:creator>David_246</dc:creator>
      <dc:date>2003-09-17T12:35:05Z</dc:date>
    </item>
  </channel>
</rss>

