Resource Management and Accounting Notebook - page 56 of 150

EditDeleteAnnotateNotarize
First PagePrevious PageNext PageLast PageTable of ContentsSearch

Date and Author(s)

Queue Manager XML - June 2002

Here are the current XML interfaces to the Queue Manager component as of June 11, 2002. Each QMRequests element sent to the server may contain multiple independent requests concatenated together. The resulting responses will be in the same order as the requests.

  
Job Submission:  
<?xml version="1.0" encoding="UTF-8" ?>  
<QMRequests>  
  <Submit-Job>  
    <nodeNum>1</nodeNum>  
    <requestedWCTime>10</requestedWCTime>  
    <command>/bin/sleep 120</command>  
    <path>/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:</path>  
    <username>brett</username>  
    <UID>000020770</UID>  
    <GID>000020770</GID>  
    <CWD>/home/pcp1/brett/QM</CWD>  
  </Submit-Job>  
</QMRequests>  

and the response:

 
 
<?xml version="1.0" encoding="UTF-8" ?>  
<QMResponses>  
  <Submit-Job>  
    <status>true</status>  
    <code>0</code>  
    <message>Job Accepted</message>  
    <JobID>4</JobID>  
  </Submit-Job>  
</QMResponses>  

Query job. The a positive JobID will selective one specific job, 0 selects all matching jobs. The Query-State element can be either "active" or "all". The requested fields may appear in any order.

 
 
<?xml version="1.0" encoding="UTF-8" ?>  
<QMRequests>  
  <Query-Job>  
    <JobID>0</JobID>  
    <Query-State>active</Query-State>  
    <Requested-Field>JobID</Requested-Field>  
    <Requested-Field>JobState</Requested-Field>  
    <Requested-Field>username</Requested-Field>  
    <Requested-Field>WCTimeUsed</Requested-Field>  
    <Requested-Field>UID</Requested-Field>  
    <Requested-Field>GID</Requested-Field>  
    <Requested-Field>command</Requested-Field>  
    <Requested-Field>path</Requested-Field>  
    <Requested-Field>CWD</Requested-Field>  
    <Requested-Field>nodeNum</Requested-Field>  
    <Requested-Field>requestedWCTime</Requested-Field>  
    <Requested-Field>accountname</Requested-Field>  
  </Query-Job>  
</QMRequests>  

a sample response:

 
<?xml version="1.0" encoding="UTF-8" ?>  
<QMResponses>  
  <Query-Job>  
    <status>true</status>  
    <code>0</code>  
    <message>1 jobs found</message>  
    <Job-Count>1</Job-Count>  
    <Job>  
      <JobID>1</JobID>  
      <JobState>Finished</JobState>  
      <username>brett</username>  
      <WCTimeUsed>23</WCTimeUsed>  
      <UID>20770</UID>  
      <GID>20770</GID>  
      <command>/bin/sleep 120</command>  
      <path>/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:</path>  
      <CWD>/home/pcp1/brett/QM</CWD>  
      <nodeNum>1</nodeNum>  
      <requestedWCTime>10</requestedWCTime>  
      <accountname>default</accountname>  
    </Job>  
  </Query-Job>  
</QMResponses>  

Job startup. The hostid field is expected to be repeated once for each host needed to match the number of processors requested by the job.

 
<?xml version="1.0" encoding="UTF-8" ?>  
<QMRequests>  
  <Run-Job>  
    <JobID>1</JobID>  
    <hostid>n2001</hostid>  
  </Run-Job>  
</QMRequests>  
 

and the response.

 
<?xml version="1.0" encoding="UTF-8" ?>  
<QMResponses>  
  <Run-Job>  
    <status>true</status>  
    <code>0</code>  
    <message>Job start command accepted</message>  
  </Run-Job>  
</QMResponses>  

Job termination/deletion.

 
<?xml version="1.0" encoding="UTF-8" ?>  
<QMRequests>  
  <Delete-Job>  
    <JobID>4</JobID>  
  </Delete-Job>  
</QMRequests>  

and response

 
<?xml version="1.0" encoding="UTF-8" ?>  
<QMResponses>  
  <Delete-Job>  
    <status>true</status>  
    <code>0</code>  
    <message>Job 4 Deleted.</message>  
  </Delete-Job>  
</QMResponses>