|
|
|
|
|
Table of Contents
After a job has been submitted and reaches a resource broker its progress will be tracked by that resource broker. Periodically information about the status of the job will be published from the resource broker via R-GMA, with changes of state published straight away. These data are then available to grid users via the R-GMA CLI or API. It is possible to issue a query to get the current state of a job or to have the query stream updates.
In order to issue an R-GMA query you must use a node with the R-GMA client installed that is correctly configured (pointing to your local R-GMA server), as is the case on worker nodes and user interfaces. You must also have a valid grid certificate. To test that R-GMA is installed and configured correctly you can use the client check:
$ rgma-client-check
*** Running R-GMA client tests on host.domain ***
Checking C API: Success
Checking C++ API: Success
Checking Command-line API: Success
Checking Java API: Success
Checking Python API: Success
*** R-GMA client test successful ***
For a description of possible job states see the Simple Job Cycle page
All the user documents for R-GMA, including the c, c++, java and python user guides, can be found here.
The examples below use the R-GMA CLI. The guide for the R-GMA CLI can be found here.
This can be done via one of the R-GMA APIs, the R-GMA browser or the R-GMA CLI. For these examples we will use the R-GMA CLI.
$ rgma -c "select * from JobStatusRaw where Job_id = 'myjobid'"
or
$ rgma -c "select * from JobStatusRaw where Owner = 'mydn'"
You can specify how long you want the query to stream data, you can specify the value in seconds, minutes, hours or days.
$ rgma -c "set query continuous" -c "set timeout 20 minutes" -c "select * from JobStatusRaw where Job_id = 'myjobid'"
or
$ rgma -c "set query continuous" -c "set timeout 20 minutes" -c "select * from JobStatusRaw where Owner = 'mydn'"