You can specify the WAIT option on the PROCESS START request so that the 
request doesn't complete until the process has completed.  For example:

  $request = 'START SHELL COMMAND xyz RETURNSTDOUT STDERRTOSTDOUT WAIT'
  $result = $handle->submit("Machine1", "PROCESS", $request);
 
  # The PROCESS START request won't return until the process has 
completed.

See example 3 in section "3.1.2.2 STAF::STAFHandle::submit" in the STAF 
Perl User's Guide which submits a PROCESS START request and WAITs for it 
to complete.

If you wanted to run the processes in parallel on the different machines, 
you would have to submit the PROCESS START requests in parallel (e.g. 
using different threads).

Note that writing a STAX job (instead of writing a Perl program) makes 
this very easy with the <paralleliterate> element and the <process> 
element.  See the STAX User's Guide for more information on STAX if you're 
interested.

Or, instead of using the WAIT option on the PROCESS START request, you can 
use the NOTIFY ONEND option on the PROCESS START request to specify that 
you want to send a notification when this process ends.  The 
STAF/Process/End notification message will be sent to the queue of the 
handle that submitted the request and you can then use the QUEUE service 
to GET a messages off your queue. 

--------------------------------------------------------------
Sharon Lucas
IBM Austin,   [EMAIL PROTECTED]
(512) 838-8347 or Tieline 678-8347




"Avijit Roy" <[EMAIL PROTECTED]> 
10/15/2008 04:08 PM

To
<staf-users@lists.sourceforge.net>
cc

Subject
[staf-users] Is there any way to track submitted request status completion 
with basic STAF






Hi,
I am trying to execute some process on 3 different machines from one of 
the driver machine. The main goal is after completion the tasks on three 
different machines, I want to copy the result file from those three 
machines into driver machine and compute the result.
I am using STAF and PERL to do the basic prototype.
My question is after submitting the task using STAF, is there any way to 
check that submitted tasks has completed or not?
 
Here are the following steps which I want to achieve: I am stuck on Step 5 
now.
 
Step 1 - Registering STAF 
Step 2 ? Submitting the request on Machine1
Step 3 - Submitting the request on Machine2
Step 4 - Submitting the request on Machine4 
Step 5 ? I want to check Step 3, 4 and 5 tasks has completed or not 
----------------------------------->? How should I do that?
Step 6 ? If completed all the tasks copy the result file from machine 1, 
2, 3 to driver machine
 
 
Can anybody please suggest me how to work it out?
 
Thanks, Avi
 -------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's 
challenge
Build the coolest Linux based applications with Moblin SDK & win great 
prizes
Grand prize is a trip for two to an Open Source event anywhere in the 
world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to