<?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 Re: catching process death in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/catching-process-death/m-p/3972711#M753371</link>
    <description>If you have several unrelated processes that you are trying to keep running, why not start them via /etc/inittab and use the respawn option.  That way if they die, they get restarted automatically.</description>
    <pubDate>Fri, 30 Mar 2007 09:26:01 GMT</pubDate>
    <dc:creator>Patrick Wallek</dc:creator>
    <dc:date>2007-03-30T09:26:01Z</dc:date>
    <item>
      <title>catching process death</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/catching-process-death/m-p/3972704#M753360</link>
      <description>Hello gurus:&lt;BR /&gt;&lt;BR /&gt;I would like to ask you if you konw a development technique or if the hpux11.23 SO has some way to cath a process, not controlled death.&lt;BR /&gt;&lt;BR /&gt;What i want is to develop a process than knows inmediatly when some others has dead.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance</description>
      <pubDate>Fri, 30 Mar 2007 06:25:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/catching-process-death/m-p/3972704#M753360</guid>
      <dc:creator>Ignacio Javier</dc:creator>
      <dc:date>2007-03-30T06:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: catching process death</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/catching-process-death/m-p/3972705#M753361</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Pl. elaborate what exactly u want to do.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 30 Mar 2007 06:45:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/catching-process-death/m-p/3972705#M753361</guid>
      <dc:creator>SANTOSH S. MHASKAR</dc:creator>
      <dc:date>2007-03-30T06:45:01Z</dc:date>
    </item>
    <item>
      <title>Re: catching process death</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/catching-process-death/m-p/3972706#M753362</link>
      <description>&lt;BR /&gt;&lt;BR /&gt;Ok, what i want is to develop a process to control others, to start them if they die.&lt;BR /&gt;&lt;BR /&gt;IÂ´ve got now one that does it sending a signal every 5 seconds and i want to improve it, so they intercomunicate or some other way within SO, so the controlling process knows when the other die, just in the moment it takes place.&lt;BR /&gt;&lt;BR /&gt;Regards</description>
      <pubDate>Fri, 30 Mar 2007 06:51:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/catching-process-death/m-p/3972706#M753362</guid>
      <dc:creator>Ignacio Javier</dc:creator>
      <dc:date>2007-03-30T06:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: catching process death</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/catching-process-death/m-p/3972707#M753363</link>
      <description>Hi Ignacio,&lt;BR /&gt;&lt;BR /&gt;I am developing a new tool - sentinel - which does exactly that. It is available for beta users with WDB 5.6 available for free download from the web at &lt;A href="http://www.hp.com/go/wdb." target="_blank"&gt;http://www.hp.com/go/wdb.&lt;/A&gt; The tool is not yet supported by HP since we first want to validate its need.&lt;BR /&gt;&lt;BR /&gt;Please take a look at it. The specific usage that you want to try is&lt;BR /&gt;&lt;BR /&gt;$&amp;gt; /opt/sentinel/bin/sentinel -silent -exit mail &lt;PID or="" command="" and="" args=""&gt;&lt;BR /&gt;&lt;BR /&gt;You'd have to specifiy SENTINEL_MAIL env variable to the appropriate email address (it defaults to root@localhost).&lt;BR /&gt;&lt;BR /&gt;Instead of using the 'mail' action for the 'exit' event, you can also specify some other command using the '-cmd &lt;ONE-WORD-COMMAND&gt;' action. For example, if you want a script test.sh to be executed automatically when the process dies, do&lt;BR /&gt;&lt;BR /&gt;$&amp;gt; /opt/sentinel/bin/sentinel -silent -exit -cmd test.sh &lt;PID or="" command="" with="" args=""&gt;&lt;BR /&gt;&lt;BR /&gt;Sentinel either spawns a process if you specify the command with arguments, or it takes a pid.&lt;BR /&gt;&lt;BR /&gt;Other events of interest to you would be 'errexit' (non-zero exit code) or 'abort' (uncaught signal).&lt;BR /&gt;&lt;BR /&gt;For more events and actions, do&lt;BR /&gt;&lt;BR /&gt;$&amp;gt; /opt/sentinel/bin/sentinel -help&lt;BR /&gt;&lt;BR /&gt;or look at the man page after adding /opt/sentinel/docs/man/man1 to MANPATH env variable.&lt;BR /&gt;&lt;BR /&gt;Please inform me if it works ok for your case by sending an email to Veeru at hp dot com.&lt;BR /&gt;&lt;BR /&gt;Cheers!&lt;BR /&gt;Veeru&lt;/PID&gt;&lt;/ONE-WORD-COMMAND&gt;&lt;/PID&gt;</description>
      <pubDate>Fri, 30 Mar 2007 07:59:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/catching-process-death/m-p/3972707#M753363</guid>
      <dc:creator>Veeru_1</dc:creator>
      <dc:date>2007-03-30T07:59:19Z</dc:date>
    </item>
    <item>
      <title>Re: catching process death</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/catching-process-death/m-p/3972708#M753365</link>
      <description>I think to have read about Sentinel, which Veeru recommends, in some Linux context not so long ago.&lt;BR /&gt;Sounds promising.&lt;BR /&gt;But there are numerous ways of monitoring processes.&lt;BR /&gt;For your situation probably overkill, but I for instance have many vital processes monitored by my Nagios server.&lt;BR /&gt;There comes a handy Nagios plug-in called check_procs with quite a few options.&lt;BR /&gt;If you define a Nagios event_handler and write a wee wrapper script you can even have crashed procs be restarted through the event handler by Nagios unattendedly, but getting notice of it however.&lt;BR /&gt;Albeit, one should always determine the cause for a crashed process rather than having it simply restarted automatically.&lt;BR /&gt; &lt;BR /&gt;</description>
      <pubDate>Fri, 30 Mar 2007 08:25:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/catching-process-death/m-p/3972708#M753365</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2007-03-30T08:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: catching process death</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/catching-process-death/m-p/3972709#M753367</link>
      <description>One word: SIGCHLD.</description>
      <pubDate>Fri, 30 Mar 2007 08:59:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/catching-process-death/m-p/3972709#M753367</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2007-03-30T08:59:32Z</dc:date>
    </item>
    <item>
      <title>Re: catching process death</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/catching-process-death/m-p/3972710#M753369</link>
      <description>That's fine if the monitoring process is the parent process, so that it actually can catch a SIGCHLD to get the child's exit value through waitpid.&lt;BR /&gt;But what if the monitor or agent is a completely unrelated process?&lt;BR /&gt;</description>
      <pubDate>Fri, 30 Mar 2007 09:12:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/catching-process-death/m-p/3972710#M753369</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2007-03-30T09:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: catching process death</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/catching-process-death/m-p/3972711#M753371</link>
      <description>If you have several unrelated processes that you are trying to keep running, why not start them via /etc/inittab and use the respawn option.  That way if they die, they get restarted automatically.</description>
      <pubDate>Fri, 30 Mar 2007 09:26:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/catching-process-death/m-p/3972711#M753371</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2007-03-30T09:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: catching process death</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/catching-process-death/m-p/3972712#M753373</link>
      <description>depending on how you have measureware configured it will capture how much resources a proces has used in that minute.  Measureware collects data on interesting processes and can collect data on processes when they start, when it dies and if a process exceeds a threshold.  This is configured in a file called /var/opt/perf/parm assuming that you have measureware (openview performance agent) installed and configured.&lt;BR /&gt;&lt;BR /&gt;You can have a program do the extract command to watch for the data on that process. &lt;BR /&gt;&lt;BR /&gt;Another option would be to configure glance with the advisor mode to print out the process list and look for a state of died for that process name.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 30 Mar 2007 20:17:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/catching-process-death/m-p/3972712#M753373</guid>
      <dc:creator>Emil Velez</dc:creator>
      <dc:date>2007-03-30T20:17:51Z</dc:date>
    </item>
    <item>
      <title>Re: catching process death</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/catching-process-death/m-p/3972713#M753374</link>
      <description>Since this question was asked in the context of a development technique then it naturally fits into the concept of a parent process which fork()'s and exec()'s a child proces to do the actual work while the parent just sits there (okay wait()'s) with a SIGCHLD handler to notify it when the child terminates or receives a signal. I see no reason to reinvent the wheel for something that UNIX has been able to do since it was a wee babe.</description>
      <pubDate>Fri, 30 Mar 2007 20:42:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/catching-process-death/m-p/3972713#M753374</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2007-03-30T20:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: catching process death</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/catching-process-death/m-p/3972714#M753375</link>
      <description>It hasn't been made quite clear if the controlling process really is the parent.&lt;BR /&gt;To me it sounded rather unrelated.&lt;BR /&gt;&lt;BR /&gt;&lt;IGNACIO_QUOTE&gt;&lt;BR /&gt; "Ok, what i want is to develop a process to control others, to start them if they die."&lt;BR /&gt;&lt;/IGNACIO_QUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;Sure, one could as Patrick suggested regard init as parent of all, and thus let the moitored processes be respawned by init.&lt;BR /&gt;But for a multitude of processes or services this hack doesn't sound too flexible to me.&lt;BR /&gt;&lt;BR /&gt;Coincidentally, I discovered in an old issue of the Linux Journal that I bought last weekend from my local tech book shop for a tenth of the issuing price, a related article that suggests a combination of a tool called "smart" together with various Nagios plug-ins in case of more involved service checks.&lt;BR /&gt;In that article the following link was given:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.linuxjournal.com/article/9268" target="_blank"&gt;http://www.linuxjournal.com/article/9268&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I haven't yet played with Smart but it sounds more lightweight than a full fledged Nagios installation.&lt;BR /&gt;</description>
      <pubDate>Mon, 02 Apr 2007 05:31:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/catching-process-death/m-p/3972714#M753375</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2007-04-02T05:31:37Z</dc:date>
    </item>
    <item>
      <title>Re: catching process death</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/catching-process-death/m-p/3972715#M753376</link>
      <description>Were you able to, or do you plan to use Sentinel? Please tell me if so. I'm eager to find out about your experience in using it.&lt;BR /&gt;&lt;BR /&gt;Thanx!&lt;BR /&gt;Veeru</description>
      <pubDate>Mon, 09 Apr 2007 13:19:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/catching-process-death/m-p/3972715#M753376</guid>
      <dc:creator>Veeru_1</dc:creator>
      <dc:date>2007-04-09T13:19:37Z</dc:date>
    </item>
  </channel>
</rss>

