<?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: at command and finding sleeping process in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/at-command-and-finding-sleeping-process/m-p/4891251#M402364</link>
    <description># echo "sleep 3600" &amp;gt;&amp;gt; somescript&lt;BR /&gt;# chmod +x somescript&lt;BR /&gt;# at now&lt;BR /&gt;/home/root/somescript&lt;BR /&gt;warning: commands will be executed using /usr/bin/sh&lt;BR /&gt;job 1110924606.a at Tue Mar 15 17:10:06 2005&lt;BR /&gt;#&lt;BR /&gt;# UNIX95= ps -efH | more&lt;BR /&gt;...............&lt;BR /&gt;root      2252     1  0  Jan 23  ?           00:15   /usr/sbin/cron&lt;BR /&gt;root     10295  2252  0 17:10:13 ?           00:00     sh&lt;BR /&gt;root     10296 10295  0 17:10:13 ?           00:00       sh&lt;BR /&gt;root     10297 10296  0 17:10:13 ?           00:00         sleep 3600&lt;BR /&gt;...............&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;Just kill the sleep - you should be fine.</description>
    <pubDate>Tue, 15 Mar 2005 17:12:04 GMT</pubDate>
    <dc:creator>Sundar_7</dc:creator>
    <dc:date>2005-03-15T17:12:04Z</dc:date>
    <item>
      <title>at command and finding sleeping process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-command-and-finding-sleeping-process/m-p/4891246#M402359</link>
      <description>Hi, I have issued at command with a script using a sleep 3600.  I am trying to find the process id and kill it but do not understand how at is handling this.  If I ps grep for the script, I see nothing.  If I grep for the sleep command, I can see a process id.  Is this the correct PID, if so do I kill the parent PID or is that a system process for cron/at?  Thanks in advance,&lt;BR /&gt;Doug</description>
      <pubDate>Tue, 15 Mar 2005 16:50:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-command-and-finding-sleeping-process/m-p/4891246#M402359</guid>
      <dc:creator>Doug_3</dc:creator>
      <dc:date>2005-03-15T16:50:58Z</dc:date>
    </item>
    <item>
      <title>Re: at command and finding sleeping process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-command-and-finding-sleeping-process/m-p/4891247#M402360</link>
      <description>Doug,&lt;BR /&gt;&lt;BR /&gt;  Parent process of the at job will be cron. DO NOT kill cron.&lt;BR /&gt;&lt;BR /&gt;  UNIX95= ps -efH&lt;BR /&gt;&lt;BR /&gt;  Execute the above command. This will display the process tree. &lt;BR /&gt;&lt;BR /&gt;  Look at the time the sleep was started. If it matches with the time you scheduled the at job for, I would go ahead and kill the process&lt;BR /&gt;&lt;BR /&gt;- Sundar&lt;BR /&gt;</description>
      <pubDate>Tue, 15 Mar 2005 17:00:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-command-and-finding-sleeping-process/m-p/4891247#M402360</guid>
      <dc:creator>Sundar_7</dc:creator>
      <dc:date>2005-03-15T17:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: at command and finding sleeping process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-command-and-finding-sleeping-process/m-p/4891248#M402361</link>
      <description>Sleep in this case is spawned as a child of the the script spawned by cron. If you kill the PID of sleep, you will kill the sleep command itself returning control to the parent script. It will probably then terminate normally. Kill sleep's PPID will kill your croned script not the cron daemon but simply killing sleep's PID should be sufficient unless your script loops and sleeps again.&lt;BR /&gt;</description>
      <pubDate>Tue, 15 Mar 2005 17:04:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-command-and-finding-sleeping-process/m-p/4891248#M402361</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2005-03-15T17:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: at command and finding sleeping process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-command-and-finding-sleeping-process/m-p/4891249#M402362</link>
      <description>Hi Douq,&lt;BR /&gt;        A record of spooled at jobs is created in the /var/spool/cron/atjobs directory, where a separate file is&lt;BR /&gt;created for each job. This file contains commands to be executed and the values of environment variables.Or u can use "at -l" to list the current jobs...&lt;BR /&gt;&lt;BR /&gt;Mitra</description>
      <pubDate>Tue, 15 Mar 2005 17:07:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-command-and-finding-sleeping-process/m-p/4891249#M402362</guid>
      <dc:creator>Mitra Rath</dc:creator>
      <dc:date>2005-03-15T17:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: at command and finding sleeping process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-command-and-finding-sleeping-process/m-p/4891250#M402363</link>
      <description>Thanks Clay, the script does loop with a while true; &lt;BR /&gt;sleep; &lt;BR /&gt;test and execute cmd;&lt;BR /&gt;exit;&lt;BR /&gt;Is there anyway to kill the "script" or do I just have to let it run it's course?</description>
      <pubDate>Tue, 15 Mar 2005 17:08:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-command-and-finding-sleeping-process/m-p/4891250#M402363</guid>
      <dc:creator>Doug_3</dc:creator>
      <dc:date>2005-03-15T17:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: at command and finding sleeping process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-command-and-finding-sleeping-process/m-p/4891251#M402364</link>
      <description># echo "sleep 3600" &amp;gt;&amp;gt; somescript&lt;BR /&gt;# chmod +x somescript&lt;BR /&gt;# at now&lt;BR /&gt;/home/root/somescript&lt;BR /&gt;warning: commands will be executed using /usr/bin/sh&lt;BR /&gt;job 1110924606.a at Tue Mar 15 17:10:06 2005&lt;BR /&gt;#&lt;BR /&gt;# UNIX95= ps -efH | more&lt;BR /&gt;...............&lt;BR /&gt;root      2252     1  0  Jan 23  ?           00:15   /usr/sbin/cron&lt;BR /&gt;root     10295  2252  0 17:10:13 ?           00:00     sh&lt;BR /&gt;root     10296 10295  0 17:10:13 ?           00:00       sh&lt;BR /&gt;root     10297 10296  0 17:10:13 ?           00:00         sleep 3600&lt;BR /&gt;...............&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;Just kill the sleep - you should be fine.</description>
      <pubDate>Tue, 15 Mar 2005 17:12:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-command-and-finding-sleeping-process/m-p/4891251#M402364</guid>
      <dc:creator>Sundar_7</dc:creator>
      <dc:date>2005-03-15T17:12:04Z</dc:date>
    </item>
    <item>
      <title>Re: at command and finding sleeping process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-command-and-finding-sleeping-process/m-p/4891252#M402365</link>
      <description>The shell which is the parent of sleep is running the script. It this is an infinite loop script, then killing the sleep process will return to the shell and start another sleep. In that case, you kill the parent of sleep which should be sh. You'll see two sh's typically, one that is running the script (parent of sleep) and one that is run by cron which the starts the subshell to run the script. Just kill the lowest sh process and the job should terminate cleanly. Always use kill -15 (never kill -9) so processes can clean themselves up correctly.</description>
      <pubDate>Tue, 15 Mar 2005 17:37:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-command-and-finding-sleeping-process/m-p/4891252#M402365</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2005-03-15T17:37:16Z</dc:date>
    </item>
    <item>
      <title>Re: at command and finding sleeping process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-command-and-finding-sleeping-process/m-p/4891253#M402366</link>
      <description>Hi Doug&lt;BR /&gt;&lt;BR /&gt;Do a ps -ef and find your process. Look for the PPID colom. DO a ps -ef and pipe the grep for the PPID. If it is the correct one ... kill the parent and then the child.&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;Gerhard</description>
      <pubDate>Wed, 16 Mar 2005 07:07:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-command-and-finding-sleeping-process/m-p/4891253#M402366</guid>
      <dc:creator>Gerhard Roets</dc:creator>
      <dc:date>2005-03-16T07:07:37Z</dc:date>
    </item>
    <item>
      <title>Re: at command and finding sleeping process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-command-and-finding-sleeping-process/m-p/4891254#M402367</link>
      <description>Close thread, thanks for the generous replies.</description>
      <pubDate>Thu, 30 Apr 2009 20:38:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-command-and-finding-sleeping-process/m-p/4891254#M402367</guid>
      <dc:creator>Doug_3</dc:creator>
      <dc:date>2009-04-30T20:38:59Z</dc:date>
    </item>
  </channel>
</rss>

