<?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: shell script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2917512#M108802</link>
    <description>Hi chris,&lt;BR /&gt;&lt;BR /&gt;how can I find out why the process is dying all the time ?&lt;BR /&gt;&lt;BR /&gt;T.</description>
    <pubDate>Mon, 03 Mar 2003 21:37:05 GMT</pubDate>
    <dc:creator>Tal Drigov</dc:creator>
    <dc:date>2003-03-03T21:37:05Z</dc:date>
    <item>
      <title>shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2917504#M108794</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I have a process that needs to be up all times. I would like to do a script that when this process dies the server will do a reboot.&lt;BR /&gt;How can I do that ?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Tal.</description>
      <pubDate>Mon, 03 Mar 2003 21:06:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2917504#M108794</guid>
      <dc:creator>Tal Drigov</dc:creator>
      <dc:date>2003-03-03T21:06:58Z</dc:date>
    </item>
    <item>
      <title>Re: shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2917505#M108795</link>
      <description>Tal,&lt;BR /&gt;&lt;BR /&gt;Why would you reboot a box when a process dies?  Why would you not respawn the process?&lt;BR /&gt;&lt;BR /&gt;Regards.&lt;BR /&gt;&lt;BR /&gt;RZ&lt;BR /&gt;</description>
      <pubDate>Mon, 03 Mar 2003 21:08:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2917505#M108795</guid>
      <dc:creator>Ross Zubritski</dc:creator>
      <dc:date>2003-03-03T21:08:28Z</dc:date>
    </item>
    <item>
      <title>Re: shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2917506#M108796</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;You could write a script and put the entry into the /etc/inittab file with an action of 'respawn', which start the script at boot [depending on the run level you specify] and restart the script if it dies.  Rebooting the box is pretty hard core, but I guess it could be done.  You can't live with just restarting the process?&lt;BR /&gt;&lt;BR /&gt;JP&lt;BR /&gt;</description>
      <pubDate>Mon, 03 Mar 2003 21:10:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2917506#M108796</guid>
      <dc:creator>John Poff</dc:creator>
      <dc:date>2003-03-03T21:10:20Z</dc:date>
    </item>
    <item>
      <title>Re: shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2917507#M108797</link>
      <description>Because the process that for some unknown reason dies on me from time to time is dhcpclient, and you can't start it manually.&lt;BR /&gt;Or can you ?</description>
      <pubDate>Mon, 03 Mar 2003 21:12:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2917507#M108797</guid>
      <dc:creator>Tal Drigov</dc:creator>
      <dc:date>2003-03-03T21:12:14Z</dc:date>
    </item>
    <item>
      <title>Re: shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2917508#M108798</link>
      <description>This isn't really effective systems administration, but its your system.  Here's a quick script.  To find the name of your running application, do "ps -ef|awk '{ print $9 }'|pg" until you see your application.  Put that name on the right side of the = sign next to APP, below.  As long as your application has a Process ID, your system won't reboot.  &lt;BR /&gt;&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;APP=yourapplication&lt;BR /&gt;&lt;BR /&gt;while true&lt;BR /&gt;do&lt;BR /&gt;     PID=`ps -ef|grep $APP|awk '{ print $3 }'`&lt;BR /&gt;     if test $PID&lt;BR /&gt;     then&lt;BR /&gt;          sleep 60  #or some other number, in seconds&lt;BR /&gt;     else&lt;BR /&gt;          reboot&lt;BR /&gt;     fi&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Its a much better idea to find out why your application is dying, and fix it.  &lt;BR /&gt;&lt;BR /&gt;Chris&lt;BR /&gt;</description>
      <pubDate>Mon, 03 Mar 2003 21:16:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2917508#M108798</guid>
      <dc:creator>Chris Vail</dc:creator>
      <dc:date>2003-03-03T21:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2917509#M108799</link>
      <description>/etc/init.d/dhcpd restart&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;service restart dhcpd&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;That will restart the server daemon.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Surely there is a command for root user that restarts the client process.&lt;BR /&gt;&lt;BR /&gt;Reboot is not the answer.&lt;BR /&gt;&lt;BR /&gt;Trapping, tracking and fixing the error is harder but the right way to go.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Mon, 03 Mar 2003 21:26:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2917509#M108799</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-03-03T21:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2917510#M108800</link>
      <description>The command is in /usr/lbin ..&lt;BR /&gt;and you got to take a look at the current options you had setup for dhcpclient at startup in order to run the command exactly with the same options.&lt;BR /&gt;# /usr/lbin/dhcpclient -h&lt;BR /&gt;would give brief usage.</description>
      <pubDate>Mon, 03 Mar 2003 21:29:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2917510#M108800</guid>
      <dc:creator>S.K. Chan</dc:creator>
      <dc:date>2003-03-03T21:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2917511#M108801</link>
      <description>You can get dhcpclient to start manually and maintain a lease.&lt;BR /&gt;&lt;BR /&gt;dhcpclient -m lan0&lt;BR /&gt;&lt;BR /&gt;or whatever lanx number you want to maintaint the lease. Dchpclient renews the lease then calculates the time that it needs to sleep before it wakes up and tries to renew the lease again. Usually dhcp clients need to try a renew half way through the lease period.&lt;BR /&gt;&lt;BR /&gt;man dhcpclient&lt;BR /&gt;&lt;BR /&gt;Good luck.</description>
      <pubDate>Mon, 03 Mar 2003 21:36:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2917511#M108801</guid>
      <dc:creator>John Dvorchak</dc:creator>
      <dc:date>2003-03-03T21:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2917512#M108802</link>
      <description>Hi chris,&lt;BR /&gt;&lt;BR /&gt;how can I find out why the process is dying all the time ?&lt;BR /&gt;&lt;BR /&gt;T.</description>
      <pubDate>Mon, 03 Mar 2003 21:37:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2917512#M108802</guid>
      <dc:creator>Tal Drigov</dc:creator>
      <dc:date>2003-03-03T21:37:05Z</dc:date>
    </item>
    <item>
      <title>Re: shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2917513#M108803</link>
      <description>From the man pages:&lt;BR /&gt;&lt;BR /&gt;To maintain the lease for the interface lan0 and invoke logging in syslog, the following set of commands is invoked at the command prompt: &lt;BR /&gt;&lt;BR /&gt;dhcpclient -b lan0 -N "dhcp1" &lt;BR /&gt;dhcpclient -m lan0 -N "dhcp1" -l 3 -t 1 &lt;BR /&gt;</description>
      <pubDate>Mon, 03 Mar 2003 21:47:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2917513#M108803</guid>
      <dc:creator>John Dvorchak</dc:creator>
      <dc:date>2003-03-03T21:47:44Z</dc:date>
    </item>
  </channel>
</rss>

