Пример интерактивной сессии (пользователь запускает свое задание)
[user@somewhere ~] cat test.dag
# Filename: test.dag
#
JOB A A.jt
[user@somewhere ~] cat A.jt
EXECUTABLE=/bin/ls
[user@somewhere ~] export PILOT_SERVER='https://tb01.ngrid.ru:4080/'
[user@somewhere ~] pilot-job-submit test.dag
Password for /home/user/.globus/userkey.pem:
Job was successfully submitted to Pilot service.
Job URI:
https://tb01.ngrid.ru:4080/jobs/1
[user@somewhere ~] pilot-job-status https://tb01.ngrid.ru:4080/jobs/1
Password for /home/user/.globus/userkey.pem:
Job https://tb01.ngrid.ru:4080/jobs/1 is new since Tue Aug 18 00:12:41 2009 UTC
[user@somewhere ~] pilot-job-status https://tb01.ngrid.ru:4080/jobs/1
Password for /home/user/.globus/userkey.pem:
Job https://tb01.ngrid.ru:4080/jobs/1 is pending since Tue Aug 18 00:14:18 2009 UTC
[user@somewhere ~] pilot-job-status --verbose https://tb01.ngrid.ru:4080/jobs/1
Password for /home/user/.globus/userkey.pem:
Job state information for https://tb01.ngrid.ru:4080/jobs/1:
* pending (Tue Aug 18 00:14:18 2009 UTC)
* new (Tue Aug 18 00:12:41 2009 UTC)
[user@somewhere ~] pilot-job-info https://tb01.ngrid.ru:4080/jobs/1
Password for /home/user/.globus/userkey.pem:
Job information for https://tb01.ngrid.ru:4080/jobs/1:
* created: 'Tue Aug 18 00:12:41 2009 UTC'
* expires: 'Tue Aug 25 00:12:41 2009 UTC'
* modified: 'Tue Aug 18 00:14:18 2009 UTC'
* operation:
[{'created': 'Tue Aug 18 00:12:43 2009 UTC',
'id': '7746b4b5-8b8b-11de-8f39-001fe2144549',
'op': 'start'}]
* owner: '/C=RU/O=RDIG/OU=users/OU=sinp.msu.ru/CN=Lev Shamardin'
* server_time: 'Tue Aug 18 00:15:09 2009 UTC'
* state:
[{'s': 'pending', 'ts': 'Tue Aug 18 00:14:18 2009 UTC'},
{'s': 'new', 'ts': 'Tue Aug 18 00:12:41 2009 UTC'}]
* tasks: {'A': 'https://tb01.ngrid.ru:4080/jobs/1/A'}
[user@somewhere ~] pilot-job-info --verbose https://tb01.ngrid.ru:4080/jobs/1
Password for /home/user/.globus/userkey.pem:
Job information for https://tb01.ngrid.ru:4080/jobs/1:
* created: 'Tue Aug 18 00:12:41 2009 UTC'
* expires: 'Tue Aug 25 00:12:41 2009 UTC'
* modified: 'Tue Aug 18 00:16:25 2009 UTC'
* operation:
[{'created': 'Tue Aug 18 00:12:43 2009 UTC',
'id': '7746b4b5-8b8b-11de-8f39-001fe2144549',
'op': 'start'}]
* owner: '/C=RU/O=RDIG/OU=users/OU=sinp.msu.ru/CN=Lev Shamardin'
* server_time: 'Tue Aug 18 00:16:28 2009 UTC'
* state:
[{'s': 'running', 'ts': 'Tue Aug 18 00:16:25 2009 UTC'},
{'s': 'pending', 'ts': 'Tue Aug 18 00:14:18 2009 UTC'},
{'s': 'new', 'ts': 'Tue Aug 18 00:12:41 2009 UTC'}]
* tasks:
{'A': {'since': 'Tue Aug 18 00:16:15 2009 UTC',
'state': 'running',
'uri': 'https://tb01.ngrid.ru:4080/jobs/1/A'}}
[user@somewhere ~] pilot-job-status https://tb01.ngrid.ru:4080/jobs/1
Password for /home/user/.globus/userkey.pem:
Job https://tb01.ngrid.ru:4080/jobs/1 is running since Tue Aug 18 00:16:25 2009 UTC
[user@somewhere ~] pilot-job-status https://tb01.ngrid.ru:4080/jobs/1
Password for /home/user/.globus/userkey.pem:
Job https://tb01.ngrid.ru:4080/jobs/1 is finished since Tue Aug 18 00:18:09 2009 UTC
[user@somewhere ~] pilot-job-info --verbose https://tb01.ngrid.ru:4080/jobs/1
Password for /home/user/.globus/userkey.pem:
Job information for https://tb01.ngrid.ru:4080/jobs/1:
* created: 'Tue Aug 18 00:12:41 2009 UTC'
* expires: 'Tue Aug 25 00:12:41 2009 UTC'
* modified: 'Tue Aug 18 00:18:09 2009 UTC'
* operation:
[{'created': 'Tue Aug 18 00:12:43 2009 UTC',
'id': '7746b4b5-8b8b-11de-8f39-001fe2144549',
'op': 'start'}]
* owner: '/C=RU/O=RDIG/OU=users/OU=sinp.msu.ru/CN=Lev Shamardin'
* server_time: 'Tue Aug 18 00:18:42 2009 UTC'
* state:
[{'s': 'finished', 'ts': 'Tue Aug 18 00:18:09 2009 UTC'},
{'s': 'running', 'ts': 'Tue Aug 18 00:16:25 2009 UTC'},
{'s': 'pending', 'ts': 'Tue Aug 18 00:14:18 2009 UTC'},
{'s': 'new', 'ts': 'Tue Aug 18 00:12:41 2009 UTC'}]
* tasks:
{'A': {'since': 'Tue Aug 18 00:18:02 2009 UTC',
'state': 'finished',
'uri': 'https://tb01.ngrid.ru:4080/jobs/1/A'}}
Пример неинтерактивной сессии (как бы взаимодействие с внешней программой)
[user@somewhere ~] export PILOT_PASSWORD='****************'
[user@somewhere ~] echo $PILOT_PASSWORD | pilot-job-submit -q test.dag
https://tb01.ngrid.ru:4080/jobs/2
[user@somewhere ~] echo $PILOT_PASSWORD | pilot-job-status -q https://tb01.ngrid.ru:4080/jobs/2
new 2009-08-18T00:20:39Z
[user@somewhere ~] echo $PILOT_PASSWORD | pilot-job-info -q https://tb01.ngrid.ru:4080/jobs/2
{
"definition": "# Filename: test.dag\n#\nJOB A A.jt\n",
"tasks": {
"A": "https://tb01.ngrid.ru:4080/jobs/2/A"
},
"server_time": "2009-08-18T00:21:23Z",
"created": "2009-08-18T00:20:39Z",
"expires": "2009-08-25T00:20:39Z",
"modified": "2009-08-18T00:20:40Z",
"server_policy_uri": "https://tb01.ngrid.ru:4080/policy/job",
"state": [
{
"s": "new",
"ts": "2009-08-18T00:20:39Z"
}
],
"owner": "/C=RU/O=RDIG/OU=users/OU=sinp.msu.ru/CN=Lev Shamardin",
"operation": [
{
"created": "2009-08-18T00:20:40Z",
"id": "9410787a-8b8c-11de-9f98-001fe2144549",
"op": "start"
}
]
}
[user@somewhere ~] echo $PILOT_PASSWORD | pilot-job-status -q https://tb01.ngrid.ru:4080/jobs/2
running 2009-08-18T00:22:32Z
[user@somewhere ~] echo $PILOT_PASSWORD | pilot-job-status -q https://tb01.ngrid.ru:4080/jobs/2
finished 2009-08-18T00:23:21Z
Пример более сложной задачи
[user@host ~]$ export PILOT_SERVER=https://tb01.ngrid.ru:5053/
[user@host ~]$ cat test2.dag
JOB T T.jt
[user@host ~]$ cat T.jt
EXECUTABLE=gsiftp://tb01.ngrid.ru/home/shamardin/testjob3.sh
ARGUMENTS=hello world
HOST=tb01.ngrid.ru
STDOUT_FILE=gsiftp://tb01.ngrid.ru/tmp/aaa-hello.txt
INPUT_FILES="x gsiftp://tb01.ngrid.ru/home/shamardin/testjob.sh, z gsiftp://tb01.ngrid.ru/home/shamardin/testjob2.sh"
OUTPUT_FILES="y gsiftp://tb01.ngrid.ru/tmp/t3.txt"
[user@host ~]$ echo $PILOT_PASSWORD | pilot-job-submit test2.dag
Job was successfully submitted to Pilot service.
Job URI:
https://tb01.ngrid.ru:5053/jobs/3
[user@host ~]$ echo $PILOT_PASSWORD | pilot-job-status https://tb01.ngrid.ru:5053/jobs/3
Job https://tb01.ngrid.ru:5053/jobs/3 is new since Mon Aug 24 01:11:28 2009 UTC
[user@host ~]$ echo $PILOT_PASSWORD | pilot-job-status https://tb01.ngrid.ru:5053/jobs/3
Job https://tb01.ngrid.ru:5053/jobs/3 is running since Mon Aug 24 01:11:33 2009 UTC
[user@host ~]$ echo $PILOT_PASSWORD | pilot-job-status https://tb01.ngrid.ru:5053/jobs/3
Job https://tb01.ngrid.ru:5053/jobs/3 is finished since Mon Aug 24 01:11:40 2009 UTC
[user@host ~]$ echo $PILOT_PASSWORD | pilot-task-status --verbose https://tb01.ngrid.ru:5053/jobs/3/T
Task state information for https://tb01.ngrid.ru:5053/jobs/3/T:
* finished (Mon Aug 24 01:11:40 2009 UTC)
* running (Mon Aug 24 01:11:33 2009 UTC)
<ns00:EndpointReference xmlns:ns00="http://www.w3.org/2005/08/addressing">
<ns00:Address>https://tb01.ngrid.ru:8443/wsrf/services/ManagedExecutableJobService</ns00:Address>
<ns00:ReferenceParameters><ResourceID xmlns="http://www.globus.org/namespaces/2008/03/gram/job">103577a0-904b-11de-9994-eb8782b261c5</ResourceID></ns00:ReferenceParameters>
</ns00:EndpointReference>
* new (Mon Aug 24 01:11:28 2009 UTC)