<?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: Sleep process problem in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/sleep-process-problem/m-p/3238066#M173196</link>
    <description>Pressed the wrong button!&lt;BR /&gt; &lt;BR /&gt;Here's the attachment</description>
    <pubDate>Fri, 02 Apr 2004 09:08:32 GMT</pubDate>
    <dc:creator>Mark Grant</dc:creator>
    <dc:date>2004-04-02T09:08:32Z</dc:date>
    <item>
      <title>Sleep process problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sleep-process-problem/m-p/3238058#M173188</link>
      <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;I have a script that is respawned by the inittab. When the script is already running, sometimes we need to stop it for some work to be done. Unfortunately not all of us have the root password, so instead of waking the UNIX administrator up at 0'clocks in the morning, we put the script to sleep by editing the header (adding sleep 6000). When the script is killed and subsequently respawned, the script obviously spawns a sleep process. The problem we are having, is that when the sleep process 'only' is killed, and the script starts up again, eventually it will die (after a few hours), and respawn 'again'. We do not know what is causing this, and are obviously keen to find out.&lt;BR /&gt;&lt;BR /&gt;many thanks&lt;BR /&gt;John</description>
      <pubDate>Fri, 02 Apr 2004 07:42:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sleep-process-problem/m-p/3238058#M173188</guid>
      <dc:creator>u856100</dc:creator>
      <dc:date>2004-04-02T07:42:39Z</dc:date>
    </item>
    <item>
      <title>Re: Sleep process problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sleep-process-problem/m-p/3238059#M173189</link>
      <description>After you modify the script, you have to kill HUP init to get it to reread the script file, because it *may* still have the old copy of the script in memory. &lt;BR /&gt;&lt;BR /&gt;mark</description>
      <pubDate>Fri, 02 Apr 2004 08:17:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sleep-process-problem/m-p/3238059#M173189</guid>
      <dc:creator>Mark Greene_1</dc:creator>
      <dc:date>2004-04-02T08:17:03Z</dc:date>
    </item>
    <item>
      <title>Re: Sleep process problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sleep-process-problem/m-p/3238060#M173190</link>
      <description>Editing the script header will only be taken into account for the next run. So apparently, you count on the process to die on its own (that's why you add the sleep 6000), but you are suprised when it die after a few hours. So, what's bother you is that it isn't spawn again  after it dies ?&lt;BR /&gt;</description>
      <pubDate>Fri, 02 Apr 2004 08:18:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sleep-process-problem/m-p/3238060#M173190</guid>
      <dc:creator>Nicolas Dumeige</dc:creator>
      <dc:date>2004-04-02T08:18:19Z</dc:date>
    </item>
    <item>
      <title>Re: Sleep process problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sleep-process-problem/m-p/3238061#M173191</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;Mark I dont think John can kill HUP if he is not root !&lt;BR /&gt;&lt;BR /&gt;John you could ask your sys admin to install  sudo and give you the ability to kill HUP &lt;BR /&gt;&lt;BR /&gt;:-) John.</description>
      <pubDate>Fri, 02 Apr 2004 08:20:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sleep-process-problem/m-p/3238061#M173191</guid>
      <dc:creator>John Carr_2</dc:creator>
      <dc:date>2004-04-02T08:20:59Z</dc:date>
    </item>
    <item>
      <title>Re: Sleep process problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sleep-process-problem/m-p/3238062#M173192</link>
      <description>John, have you considered a sleep 3600 will sleep for 1 hour, so a sleep 6000 will only sleep for less then 2 hours?!</description>
      <pubDate>Fri, 02 Apr 2004 08:34:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sleep-process-problem/m-p/3238062#M173192</guid>
      <dc:creator>Elmar P. Kolkman</dc:creator>
      <dc:date>2004-04-02T08:34:25Z</dc:date>
    </item>
    <item>
      <title>Re: Sleep process problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sleep-process-problem/m-p/3238063#M173193</link>
      <description>Hi Chaps, thanks for the responses, they are appreciated!!&lt;BR /&gt;&lt;BR /&gt;The sleep values etc are irrelevant in my case as I am just preventing the script from running so I can prevent users from logging onto a weblogic instance (started, stopped by the script). The weird thing is that when I create the sleep process, kill it so that the script starts running from where it left off, the application crashes and restarts again after a time period. This time period is much larger (2-3 times) than the sleep value I specified, so it can't be that. &lt;BR /&gt;&lt;BR /&gt;This has happened a couple of times now.&lt;BR /&gt;&lt;BR /&gt;thanks again chaps</description>
      <pubDate>Fri, 02 Apr 2004 08:42:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sleep-process-problem/m-p/3238063#M173193</guid>
      <dc:creator>u856100</dc:creator>
      <dc:date>2004-04-02T08:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: Sleep process problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sleep-process-problem/m-p/3238064#M173194</link>
      <description>Are you able to get this script changed?&lt;BR /&gt;&lt;BR /&gt;If the script is basically looping, I'd do something along the lines of getting the script to check for the presence of a file. If it finds a file, sleep. If it doesn't, then continue. The flow would be:&lt;BR /&gt;&lt;BR /&gt;init program loop&lt;BR /&gt;if file exists&lt;BR /&gt;   sleep 500&lt;BR /&gt;else&lt;BR /&gt;   process normally&lt;BR /&gt;fi&lt;BR /&gt;endloop&lt;BR /&gt;&lt;BR /&gt;Just touch the file its looking for to start the sleep process, then delete it when you want processing to continue.&lt;BR /&gt;&lt;BR /&gt;Col.</description>
      <pubDate>Fri, 02 Apr 2004 08:43:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sleep-process-problem/m-p/3238064#M173194</guid>
      <dc:creator>Colin Topliss</dc:creator>
      <dc:date>2004-04-02T08:43:28Z</dc:date>
    </item>
    <item>
      <title>Re: Sleep process problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sleep-process-problem/m-p/3238065#M173195</link>
      <description>I don't think modifying a running script will always have the results you hope for.  The idea sounds clever but there must be a better way.&lt;BR /&gt; &lt;BR /&gt;Can't the script be made loop arouns a "sleep" itself if, for example a file exists and you can touch and remove that file.&lt;BR /&gt; &lt;BR /&gt;I do have another alternative for you which may be a bit of overkill for what you want.&lt;BR /&gt; &lt;BR /&gt;THe attached script behaves like init in that it can "respawn" processes.  However, with this script, processes are given named run levels.   A process runs (and is respawned) within one or more run levels.  Thus you could respawn your script and when you want to stop it, you just change to a run level that the script isn't in.  &lt;BR /&gt; &lt;BR /&gt;As an encore, the script also does various alerting things and monitors itself.</description>
      <pubDate>Fri, 02 Apr 2004 09:07:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sleep-process-problem/m-p/3238065#M173195</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2004-04-02T09:07:43Z</dc:date>
    </item>
    <item>
      <title>Re: Sleep process problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sleep-process-problem/m-p/3238066#M173196</link>
      <description>Pressed the wrong button!&lt;BR /&gt; &lt;BR /&gt;Here's the attachment</description>
      <pubDate>Fri, 02 Apr 2004 09:08:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sleep-process-problem/m-p/3238066#M173196</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2004-04-02T09:08:32Z</dc:date>
    </item>
    <item>
      <title>Re: Sleep process problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sleep-process-problem/m-p/3238067#M173197</link>
      <description>You'll also need an example config file&lt;BR /&gt; &lt;BR /&gt;</description>
      <pubDate>Fri, 02 Apr 2004 09:09:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sleep-process-problem/m-p/3238067#M173197</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2004-04-02T09:09:09Z</dc:date>
    </item>
    <item>
      <title>Re: Sleep process problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sleep-process-problem/m-p/3238068#M173198</link>
      <description>John&lt;BR /&gt;&lt;BR /&gt;Lateral thinking:&lt;BR /&gt;&lt;BR /&gt;Get the sys admin to give you full permision on the script.&lt;BR /&gt;&lt;BR /&gt;if script is called fred then create an empty one called fred-do-nothing.&lt;BR /&gt;&lt;BR /&gt;Routine will them be&lt;BR /&gt;&lt;BR /&gt;cp fred fred.bak&lt;BR /&gt;cp fred-do-nothing fred&lt;BR /&gt;&lt;BR /&gt;When finished reverse it&lt;BR /&gt;&lt;BR /&gt;cp fred.back fred&lt;BR /&gt;&lt;BR /&gt;Reason&lt;BR /&gt;Init will not report errors if the script exists.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Simple&lt;BR /&gt;&lt;BR /&gt;Paula</description>
      <pubDate>Fri, 02 Apr 2004 12:00:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sleep-process-problem/m-p/3238068#M173198</guid>
      <dc:creator>Paula J Frazer-Campbell</dc:creator>
      <dc:date>2004-04-02T12:00:10Z</dc:date>
    </item>
  </channel>
</rss>

