As defined in the STAX User's Guide, a "LIST JOB <JobID> STAFCMDS" request 
submitted to the STAX service returns a list of any STAF commands that are 
currently running in a STAX job.  By "currently running", it means that 
the STAF service  request has been submitted and the request hasn't 
completed yet.  Please see the STAX User's Guide for a complete 
description of every request that can be submitted to the STAX service.

A "LIST JOB <JobID> STAFCMDS" request will list more than one STAF command 
if more then one STAF command (submitted via a <stafcmd> element) is 
currently running.  This would be the case if a STAX job is running 
<stafcmd> elements in parallel via the <parallel> and/or <paralleliterate> 
elements.  It shows the actual STAF service requests that were submitted 
(e.g. after Python evaluation has been done) and are still currently 
running.  For example, the output from a STAX LIST STAFCMDS request if 
these staf service commands are running in parallel within a STAX job:

Stafcmd Name  Location Request# Service Request
------------- -------- -------- ------- 
----------------------------------------------------
Delay 30 secs server1  343      DELAY   DELAY 30000
List services server2  349      SERVICE LIST SERVICES
Delay 60 secs machineC 351      DELAY   DELAY 60000
STAFCommand24 machineA 355      FS      COPY FILE /tests/TestA.out TOFILE 
/results/TestA.out 
STAFCommand25 machineB 357      FS      COPY FILE /tests/TestA.out TOFILE 
/results/TestA.out 

You appear to be asking for a list of all STAF commands that may be run 
within a STAX job which isn't possible. The STAX service doesn't know 
which <stafcmd> elements will actually be run by a STAX job until the 
<stafcmd> element is actually run (during runtime).  That is, a <stafcmd> 
element may only run if certain conditions occur, etc. due to <if> 
elements, etc..  Your STAX job may be simply run some STAF commands 
serially (e.g. a <sequence> element that contains some <stafcmd> 
elements), but STAX jobs can be much more complex than that.  Certain 
<stafcmd> elements may only be run conditionally and/or <stafcmd> elements 
may be run within a <paralleliterate> based on a list of machines, or 
<stafcmd> elements may be run within a <loop>, etc. Also, note that the 
actual STAF service request that is submitted isn't known until the 
<stafcmd> begins execution and evaluates any Python code within the 
location, service, and request sub-element values.

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




Chris <[EMAIL PROTECTED]> 
Sent by: [EMAIL PROTECTED]
07/15/2008 12:20 PM

To
staf-users@lists.sourceforge.net
cc

Subject
[staf-users] Can't output all the commands for a job






Hi,
I'd like to be able to get a list of all the commands to be run for a
job. At the moment when I run 'staf local stax list job [jobnumber]
stafcmds', I will only get the current command.

If the job is a Pending Request, running 'staf local stax list job
[jobnumber] stafcmds' yields...
Stafcmd Name Location Request# Service Request
------------ -------- -------- ------- ------------------------
STAFCommand1 local    [requestnumber]   respool request pool [machinename]

If the job is at the end of the queue (it is currently running),
running 'staf local stax list job [jobnumber] stafcmds' yields...
Stafcmd Name Location Request# Service Request
------------ -------- -------- ------- 
----------------------------------------
STAFCommand2 [machinename] [requestnumber]   process START COMMAND
[the actual command we want to run when it gets to the end of the
queue]

Where as what I would like to be able to output is when a job is a
Pending Request is...

Stafcmd Name Location Request# Service Request
------------ -------- -------- ------- ------------------------
STAFCommand1 local    [requestnumber]   respool request pool [machinename]
STAFCommand2 [machinename] [requestnumber]   process START COMMAND
[the actual command we want to run when it gets to the end of the
queue]

Am I running the wrong command to output this information (it's all in
the xml file for stax to read.. but the parameter 'stafcmds' suggested
to me that it'd retrieve all of the commands related to the job so I'm
a bit confused.

I am running version 3.1.1 of stax and version 3.1.2 of staf,

Any help on this matter would be gratefully received,

Many thanks,
Chris

-------------------------------------------------------------------------
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