<?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: How to list currently running batch jobs in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-currently-running-batch-jobs/m-p/2878425#M100314</link>
    <description>Pete:&lt;BR /&gt;&lt;BR /&gt;pid=`ps .....</description>
    <pubDate>Fri, 10 Jan 2003 13:08:09 GMT</pubDate>
    <dc:creator>Carlos Fernandez Riera</dc:creator>
    <dc:date>2003-01-10T13:08:09Z</dc:date>
    <item>
      <title>How to list currently running batch jobs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-currently-running-batch-jobs/m-p/2878416#M100305</link>
      <description>Can I list currently running jobs that were initiated via the batch command?&lt;BR /&gt;&lt;BR /&gt;eg. Scriptfile testit:&lt;BR /&gt;---&lt;BR /&gt;while true&lt;BR /&gt;do&lt;BR /&gt;  sleep 77&lt;BR /&gt;done&lt;BR /&gt;---&lt;BR /&gt;Run script with:&lt;BR /&gt;batch&lt;TESTIT&gt;&lt;/TESTIT&gt;&lt;BR /&gt;at -l does not list running job.  Is there a way to list it?&lt;BR /&gt;</description>
      <pubDate>Thu, 09 Jan 2003 19:44:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-currently-running-batch-jobs/m-p/2878416#M100305</guid>
      <dc:creator>Richard Mertz</dc:creator>
      <dc:date>2003-01-09T19:44:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to list currently running batch jobs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-currently-running-batch-jobs/m-p/2878417#M100306</link>
      <description>I do not know of a simple method.&lt;BR /&gt;&lt;BR /&gt;I think the only thing you can do is extract and process these kind of entries from /var/adm/cron/log:&lt;BR /&gt;&lt;BR /&gt;Start:&lt;BR /&gt;&lt;BR /&gt;&amp;gt;  CMD: 1042193129.b&lt;BR /&gt;&amp;gt;  franks 8815 b Fri Jan 10 11:05:29 MET 2003&lt;BR /&gt;[...]&lt;BR /&gt;&lt;BR /&gt;End:&lt;BR /&gt;&amp;lt;  franks 8815 b Fri Jan 10 11:08:02 MET 2003</description>
      <pubDate>Fri, 10 Jan 2003 10:12:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-currently-running-batch-jobs/m-p/2878417#M100306</guid>
      <dc:creator>Frank Slootweg</dc:creator>
      <dc:date>2003-01-10T10:12:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to list currently running batch jobs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-currently-running-batch-jobs/m-p/2878418#M100307</link>
      <description>Have you tried &lt;BR /&gt;&lt;BR /&gt;at -l -qb&lt;BR /&gt;&lt;BR /&gt;This tells is to use queue b, which should be those submitted via batch</description>
      <pubDate>Fri, 10 Jan 2003 10:42:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-currently-running-batch-jobs/m-p/2878418#M100307</guid>
      <dc:creator>Chris Wilshaw</dc:creator>
      <dc:date>2003-01-10T10:42:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to list currently running batch jobs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-currently-running-batch-jobs/m-p/2878419#M100308</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Try this.&lt;BR /&gt;&lt;BR /&gt;#ps -ef | grep sleep&lt;BR /&gt;&lt;BR /&gt;will show you whether your job is running or not.&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;U.SivaKumar</description>
      <pubDate>Fri, 10 Jan 2003 10:49:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-currently-running-batch-jobs/m-p/2878419#M100308</guid>
      <dc:creator>U.SivaKumar_2</dc:creator>
      <dc:date>2003-01-10T10:49:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to list currently running batch jobs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-currently-running-batch-jobs/m-p/2878420#M100309</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I'm in mind with Frank. I found following documentation:&lt;BR /&gt;&lt;BR /&gt;--- snip ---&lt;BR /&gt;Going through the source for at and cron and also looking at the manuals I found out the at jobs are place in /usr/spool/cron/atjobs (cronjobs for cron).  Then cron monitors the entries and executes the jobs at appropriate time.  The user can look at /usr/lib/cron/log file to monitor the log file and get process IDs.  The log file keeps growing until the system is rebooted.&lt;BR /&gt;--- snap ---&lt;BR /&gt;&lt;BR /&gt;Regards ...&lt;BR /&gt;Armin</description>
      <pubDate>Fri, 10 Jan 2003 11:22:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-currently-running-batch-jobs/m-p/2878420#M100309</guid>
      <dc:creator>Armin Feller</dc:creator>
      <dc:date>2003-01-10T11:22:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to list currently running batch jobs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-currently-running-batch-jobs/m-p/2878421#M100310</link>
      <description>There is another way.&lt;BR /&gt;&lt;BR /&gt;Find out the PID of your cron, and run a &lt;BR /&gt;&lt;BR /&gt;ps -ef | grep &lt;PID&gt;&lt;BR /&gt;&lt;BR /&gt;As cron is the parent process of the batch jobs, this should display them.&lt;/PID&gt;</description>
      <pubDate>Fri, 10 Jan 2003 11:33:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-currently-running-batch-jobs/m-p/2878421#M100310</guid>
      <dc:creator>Chris Wilshaw</dc:creator>
      <dc:date>2003-01-10T11:33:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to list currently running batch jobs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-currently-running-batch-jobs/m-p/2878422#M100311</link>
      <description>Since the script produces no output, there is nothing stored in any of the suggested directories.  at -l -qb does not display anything.   The only thing that seems to be available is to ps -ef|grep /usr/sbin/cron,&lt;BR /&gt;grab the pid for cron and do a ps -ef for that pid which will  show the processes that have been spawned by cron.</description>
      <pubDate>Fri, 10 Jan 2003 12:00:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-currently-running-batch-jobs/m-p/2878422#M100311</guid>
      <dc:creator>Richard Mertz</dc:creator>
      <dc:date>2003-01-10T12:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to list currently running batch jobs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-currently-running-batch-jobs/m-p/2878423#M100312</link>
      <description>&lt;BR /&gt;From /sbin/init.d/cron&lt;BR /&gt;&lt;BR /&gt;'stop')                                                                                                                             &lt;BR /&gt;        #                                                                                                                           &lt;BR /&gt;        # Determine PID of process(es) to stop                                                                                      &lt;BR /&gt;        #                                                                                                                           &lt;BR /&gt;        pid=`ps -el | awk '( ($NF ~ /cron/) &amp;amp;&amp;amp; ($4 != mypid) &amp;amp;&amp;amp; ($5 != mypid)  ){ print $4 }' mypid=$$ `                            &lt;BR /&gt;        if [ "X$pid" != "X" ]; then                                                                                                 &lt;BR /&gt;                if kill $pid; then                                                                                                  &lt;BR /&gt;                        echo "cron stopped"                                                                                         &lt;BR /&gt;                else                                                                                                                &lt;BR /&gt;                        set_return                                                                                                  &lt;BR /&gt;                        echo "Unable to stop cron"                                                                                  &lt;BR /&gt;                fi                                                                                                                  &lt;BR /&gt;        fi                                                                                                                          &lt;BR /&gt;        ;;                                                                                     &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;A better solution could be:&lt;BR /&gt;&lt;BR /&gt;ps -fg $pid will list all jobs started by any job started by cron.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 10 Jan 2003 12:42:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-currently-running-batch-jobs/m-p/2878423#M100312</guid>
      <dc:creator>Carlos Fernandez Riera</dc:creator>
      <dc:date>2003-01-10T12:42:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to list currently running batch jobs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-currently-running-batch-jobs/m-p/2878424#M100313</link>
      <description>Since $pid doesn't exist, try:&lt;BR /&gt;&lt;BR /&gt;ps -fg `ps -el | awk '( ($NF ~ /cron/) &amp;amp;&amp;amp; ($4 != mypid) &amp;amp;&amp;amp; ($5 !=mypid) ){ print $4 }' mypid=$$ `&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Fri, 10 Jan 2003 12:47:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-currently-running-batch-jobs/m-p/2878424#M100313</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2003-01-10T12:47:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to list currently running batch jobs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-currently-running-batch-jobs/m-p/2878425#M100314</link>
      <description>Pete:&lt;BR /&gt;&lt;BR /&gt;pid=`ps .....</description>
      <pubDate>Fri, 10 Jan 2003 13:08:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-currently-running-batch-jobs/m-p/2878425#M100314</guid>
      <dc:creator>Carlos Fernandez Riera</dc:creator>
      <dc:date>2003-01-10T13:08:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to list currently running batch jobs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-currently-running-batch-jobs/m-p/2878426#M100315</link>
      <description>Of course you're right, Carlos, but, since I didn't see pid being set up in your post, I was trying to make things clear.&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Fri, 10 Jan 2003 13:13:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-currently-running-batch-jobs/m-p/2878426#M100315</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2003-01-10T13:13:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to list currently running batch jobs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-currently-running-batch-jobs/m-p/2878427#M100316</link>
      <description>No problem Pete. I just copy it because:&lt;BR /&gt;&lt;BR /&gt;1- The system check it this way.&lt;BR /&gt;&lt;BR /&gt;2- what an an amazing syntax. Today is a good day too to learn somthing more.</description>
      <pubDate>Fri, 10 Jan 2003 13:19:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-currently-running-batch-jobs/m-p/2878427#M100316</guid>
      <dc:creator>Carlos Fernandez Riera</dc:creator>
      <dc:date>2003-01-10T13:19:15Z</dc:date>
    </item>
  </channel>
</rss>

