Getting Started with Gridseed and gLite Middleware

1.  Authentication

1.1  Generate your own certificate


We should now get a digital certificate from the Gridseed Certification Authority. For this reason a simple script is available: AskCert.sh Let just use it! Invoking it without parameter it just tells you how to use it:

[user02@ui-1 ~]$ AskCert.sh 


  /usr/bin/AskCert.sh name surname

  In case that the name or surname have white space in it Please escape it 
  For example for the user Pico de Paperis the right syntax is the following 

  /usr/bin/AskCert.sh Pico "de Paperis" 

Pay Attention to use the capital letters defining the name and the surname. For example use Francesco Bianchi and NOT francesco bianchi and therefore:

[user02@ui-1 ~]$ AskCert.sh user02 user02

asked certificate please wait generation
1 2 3 4 5 
--15:28:02--  http://ca.grid.seed/ca/certificates/user/user02_user02/userkey.pem
           => `userkey.pem'
Resolving ca.grid.seed... 10.10.0.1
Connecting to ca.grid.seed|10.10.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1,751 (1.7K) [text/plain]

100%[====================================================================================>] 1,751         --.--K/s             

15:28:02 (23.19 MB/s) - `userkey.pem' saved [1751/1751]

--15:28:02--  http://ca.grid.seed/ca/certificates/user/user02_user02/usercert.pem
           => `usercert.pem'
Resolving ca.grid.seed... 10.10.0.1
Connecting to ca.grid.seed|10.10.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3,882 (3.8K) [text/plain]

100%[====================================================================================>] 3,882         --.--K/s             

15:28:02 (52.14 MB/s) - `usercert.pem' saved [3882/3882]

To use your Certicate please Run the following command 

   voms-proxy-init --voms gridseed

The passphrase is gridseed

Please wait Two Minutes for DNS - VOMS integration
before use your Certificate

1.2  Checking your certificate


As you can check from the information printed out, the script just ask to the Certification Authority Server (ca.grid.seed) to generate a certificate and then downloads it. Please note as well that the pass phrase for the certificate is gridseed

Your personal certificate is split in two separate files stored in a directory called .globus. We can check this by the following command:

[user02@ui-1 ~]$ ls -lrt .globus/
total 12
-r--------  1 user02 user02 1751 Jul 30 15:21 userkey.pem
-rw-r--r--  1 user02 user02 3882 Jul 30 15:21 usercert.pem

As you can see in the .globus directory userkey.pem (the private part of the key) and usercert.pem (the public part of your key i.e. the certificate itself) are stored with the right permissions.

The third file is just a small html file informing us the creation of the certificate was successful. We can just ignored it. These two files are effectively your public and private keys, which will be used for the authenticated connections with all the other grid elements. It is essential that they have the correct file permissions otherwise you won't be able to create a proxy.

In case of wrong permissions (it should never happen on Gridseed) here the commands to give them the correct ones:

chmod 400 .globus/userkey.pem
chmod 644 .globus/usercert.pem

We can then take a look at the full certificate by issuing the following command:

[user02@ui-1 ~]$ grid-cert-info 
Certificate:
    Data:
        Version: 1 (0x0)
        Serial Number: 34 (0x22)
        Signature Algorithm: sha1WithRSAEncryption
        Issuer: O=GRIDSEED, DC=seed, DC=grid, CN=GRIDSEED CA 1
        Validity
            Not Before: Jul 30 13:21:46 2009 GMT
            Not After : Jul 30 13:21:46 2010 GMT
        Subject: O=GRIDSEED, DC=seed, DC=grid, OU=Personal Certificate, CN=user02 user02
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
            RSA Public Key: (2048 bit)
                Modulus (2048 bit):
                    00:be:d2:45:c3:ed:88:4a:d8:c1:2c:3b:73:a0:8b:
                    88:1e:27:53:71:ca:ff:ee:2a:b2:86:03:b1:d3:81:
                    ac:d2:3f:1e:c5:ff:b0:34:ec:7a:01:9b:f5:57:0d:
                    57:a7:0b:18:86:42:6d:64:ae:66:f4:3c:5a:c8:bd:
                    ab:58:0a:67:c5:8e:bd:32:2f:1a:5d:34:7c:73:18:
                    47:d7:73:61:ed:a5:d9:16:be:3d:2a:90:10:f0:29:
                    a8:8e:79:8e:b8:b5:ce:6c:ab:f6:24:d6:cb:5f:1c:
                    cf:67:28:d9:bc:ca:9e:2c:ac:59:a2:a0:ff:ed:7a:
                    9b:41:97:e4:54:26:de:e0:cd:09:e8:67:9a:09:15:
                    fc:d6:7d:00:f8:4f:16:d2:50:bd:51:d9:be:de:1a:
                    9a:54:7b:c3:4b:5b:09:dd:5e:29:69:d4:4c:93:66:
                    c0:e9:f3:bc:80:68:50:9a:a3:97:b6:17:38:1b:25:
                    95:38:ca:00:ca:81:db:db:28:d7:0e:dd:69:c1:be:
                    26:6e:a6:0e:7d:1d:7c:1c:18:a2:1e:aa:16:b6:28:
                    9e:2f:b5:3f:b5:70:8d:b8:35:a2:46:aa:79:4b:7b:
                    c0:e5:41:d1:8a:80:59:ed:a7:ea:f1:e8:c4:ba:f5:
                    51:4a:b3:07:24:b5:be:62:f0:d4:db:8a:3e:54:33:
                    eb:ab
                Exponent: 65537 (0x10001)
    Signature Algorithm: sha1WithRSAEncryption
        00:bc:ab:34:ce:1a:bc:ae:96:82:9c:bf:b0:57:69:7a:80:1b:
        43:23:e6:0d:e6:14:8c:12:c2:50:6a:34:7b:c3:5f:5f:d0:27:
        b6:6a:54:53:cf:23:62:a2:68:23:60:03:29:b8:df:cb:6a:58:
        55:c4:b0:6e:16:1b:e5:58:4f:8d:d8:1f:10:24:64:70:f0:b2:
        0f:bc:2e:dc:86:00:20:b0:32:85:bf:e2:50:03:0c:1d:da:39:
        2f:36:b9:97:45:ff:74:1e:c9:93:4e:fe:1e:04:3f:44:b7:91:
        fa:48:e3:a4:a9:ad:be:6a:4a:7d:04:e0:61:75:d9:7a:f8:eb:
        2b:82:69:71:25:e8:cd:f8:bf:81:18:64:3d:50:91:96:66:3e:
        99:75:84:ec:df:e9:0e:45:11:82:a3:7d:5a:c6:e3:b9:03:4d:
        96:c9:9c:3e:33:8a:33:3c:d4:3e:10:54:ee:e9:de:8f:c1:1a:
        dc:84:4f:cb:54:4b:52:b3:74:c9:29:59:56:45:6d:d6:71:3b:
        2b:00:1d:c0:4b:de:19:9e:58:fc:57:f3:ed:f6:b5:bf:b7:46:
        cf:1f:9f:31:b3:e0:de:ac:e6:a4:e7:46:4b:a5:56:6c:0f:0f:
        64:dd:50:36:8c:cc:d8:72:33:6d:56:40:19:ec:42:28:6c:78:
        d0:5a:f3:15

There are three interesting things to check here:

  • dates of creation and of expiration
  • the name and subject of the Certification Authority which issued the certificate,
  • the Common Name (CN) of the certificate owner, and the certificate subject, which uniquely identifies the certificate owner.

1.3  Creation of a proxy with voms extensions


We are now ready to create a proxy from our certificate: by means of it we can now start interacting with the grid. The proxy will use Voms extensions for only Virtual Organization enabled on Gridseed: gridseed.

Please remember that the pass phrase requested is again gridseed

[user02@ui-1 ~]$ voms-proxy-init -voms gridseed
Cannot find file or dir: /home/user02/.glite/vomses
Enter GRID pass phrase:
Your identity: /O=GRIDSEED/DC=seed/DC=grid/OU=Personal Certificate/CN=user02 user02
Creating temporary proxy ....................... Done
Contacting  master.grid.seed:15000 [/O=GRIDSEED/DC=seed/DC=grid/OU=Host Certificate/CN=master.grid.seed] "gridseed" Done
Creating proxy ................................ Done
Your proxy is valid until Tue Aug 18 03:58:07 2009

1.4  Check your voms proxy


Once that your proxy has been created, you can gather info on it through the voms-proxy-info command. Specify it with -all option: this will show also the VO related infos added by the VOMS server, such as belonging groups or roles. You may note also two different lifetimes : first is related to the proxy itself, the second one is referred to the AC infos added by the VOMS server. They have to be valid both in order to be fully enabled to perform operations.

[user02@ui-1 ~]$ voms-proxy-info --all
subject   : /O=GRIDSEED/DC=seed/DC=grid/OU=Personal Certificate/CN=user02 user02/CN=proxy
issuer    : /O=GRIDSEED/DC=seed/DC=grid/OU=Personal Certificate/CN=user02 user02
identity  : /O=GRIDSEED/DC=seed/DC=grid/OU=Personal Certificate/CN=user02 user02
type      : proxy
strength  : 1024 bits
path      : /tmp/x509up_u1002
timeleft  : 11:59:41
=== VO gridseed extension information ===
VO        : gridseed
subject   : /O=GRIDSEED/DC=seed/DC=grid/OU=Personal Certificate/CN=user02 user02
issuer    : /O=GRIDSEED/DC=seed/DC=grid/OU=Host Certificate/CN=master.grid.seed
attribute : /gridseed/Role=NULL/Capability=NULL
timeleft  : 11:59:45
uri       : master.grid.seed:15000

2.  Browsing the Information System

2.1  lcg-infosites command


The lcg-infosites command is actually just a Perl script wrapping a series of LDAP commands and was developed to allow the user to retrieve information on Grid resources for the most common cases

USAGE: lcg-infosites --vo voname -[v] -f [site name] [option(s)] [-h| --help] [--is BDII]

from the help

DESCRIPTION:

--vo: VO name (mandatory)

-h: help option

--is: BDII user wishes to query. In case this argument is not 
supplied, the BDII defined into the LCG_GFAL_INFOSYS environment
variable will be interrogated.

-f: (filter). Giving as input the name of the site, the chosen local
service is provided

OPTIONS:

--> se: The names of the SEs supported by the user's VO together with
        the available and used space are printed.
        If -v 1: Only the names of the SEs are given.

--> ce: The information relative to number of CPUs, running jobs, 
        waiting jobs and names of the CEs are provided. All these data
        group all VOs together. 
        If -v 1: Only the names of the queues are given.
        If -v 2: The names of the queues together with the RAMMemory,
                 Operation system and its version and the processors
                 are printed.

--> closeSE: The names of the CEs where the user's VO is allowed to run 
             together with their corresponding closest SEs are provided.

--> rb: It publishes the names of the RBs available for each VO

--> lrc (rmc): The name of the lrc (rmc) corresponding to the user's VO.

--> lfc (lfcLocal): Name of the LFC (local) servers        

--> rb: Names of the Rbs available for each VO

--> dli (dliLocal): Names od the DLIs per VO

--> vobox: Names of the voboxes per VO

--> fts: Names of the fts Endpoints per VO

--> sitenames: Names of the LCG sites

NOTE: The followingfeatures support the -f option:
      rb, dli(dliLocal), vobox, fts, lfc(lfcLocal) 

2.2  Getting information on computing elements (CE)


This is the command to get this information:

[user02@ui-1 ~]$ lcg-infosites --vo gridseed ce
#CPU	Free	Total Jobs	Running	Waiting	ComputingElement
----------------------------------------------------------
   4	   4	   0	          0	   0	ce-3.grid.seed:2119/jobmanager-lcgpbs-default
   4	   4	   0	          0	   0	ce-4.grid.seed:2119/jobmanager-lcgpbs-default
   4	   4	   0	          0	   0	ce-6.grid.seed:2119/jobmanager-lcgpbs-default
   4	   4	   0	          0	   0	ce-1.grid.seed:2119/jobmanager-lcgpbs-default
   4	   4	   0	          0	   0	ce-5.grid.seed:2119/jobmanager-lcgpbs-default

A little bit of more information is obtained by issuing the command with -v2 option. Note however that in the case of grid-seed virtual machines these numbers have le little meaning for processors and RAM.

[user02@ui-1 ~]$ lcg-infosites --vo gridseed ce -v 2
RAMMemory    Operating System	 System Version	           Processor	Subcluster name
-------------------------------------------------------------------------------------------------------------------------
    256	       ScientificLinux	  4.7	                                  vmware	                     ce-3.grid.seed
    256	       ScientificLinux	  4.7	                                  vmware	                     ce-4.grid.seed
    256	       ScientificLinux	  4.7	                                  vmware	                     ce-6.grid.seed
    256	       ScientificLinux	  4.7	                                  vmware	                     ce-1.grid.seed
    256	       ScientificLinux	  4.7	                                  vmware	                     ce-5.grid.seed

2.3  Getting information on storage elements (SE)


The following command lists all the available computing queues for the given gridseed VO

[user02@ui-1 ~]$ lcg-infosites --vo gridseed se 
Avail Space(Kb) Used Space(Kb)  Type	SEs
----------------------------------------------------------
5               3               n.a 	se-1.grid.seed
5               3               n.a 	se-1.grid.seed
5428895         2332590         n.a 	se-2.grid.seed

Note: due to a small bug in the gLite/GridSeed top BDII implementation Storage Elements are reported twice at the moment. The problem will be fixed soon.

2.4  Getting binding information between CE and SE


It is also possible to obtain a list of storage elements (SE) closest to each computing element (CE). The term "close" in gLite infrastructures can have several meanings including physical distance and speed of data access (available bandwidth). The closest SE to a CE is defined by the manager of the CE.

[user01@ui-1 ~]$ lcg-infosites --vo gridseed  closeSE
valor del bdii: top-bdii.grid.seed:2170
Name of the CE: ce-1.grid.seed:2119/jobmanager-lcgpbs-defaults
	se-1.grid.seed

2.5  lcg-info command


The lcg-info command can be used to list either CEs or the SEs that satisfy a given set of conditions on their attributes, and to print, for each of them, the values of a given set of attributes. The information is taken from the BDII specified by the LCG GFAL INFOSYS environment variable or in the command line.

user01@ui-1 ~]$ lcg-info 
Usage:
     lcg-info --list-ce [--bdii bdii] [--vo vo] [--sed] [--debug]
              [--query query] [--attrs list]

     lcg-info --list-se [--bdii bdii] [--vo vo] [--sed] [--debug]
              [--query query] [--attrs list]

     lcg-info --list-service [--bdii bdii] [--vo vo] [--sed] [--debug]
              [--query query] [--attrs list]

     lcg-info --list-site [--bdii bdii] [--vo vo] [--sed] [--debug]
              [--query query] [--attrs list]

     lcg-info --list-attrs

     lcg-info --help

A detailed help is available by means of -help option.

2.6  Simples Queries using lcg-info


List all the Computing Elements satisfying the given conditions (TotalCPUs=4) and print the desired attributes (FreeCPUs,!TotalJobs)

[user02@ui-1 ~]$ lcg-info --vo gridseed  --list-ce --query 'TotalCPUs = 4' --attrs 'RunningJobs,FreeCPUs'
- CE: ce-1.grid.seed:2119/jobmanager-lcgpbs-default
  - RunningJobs         0
  - FreeCPUs            4

- CE: ce-3.grid.seed:2119/jobmanager-lcgpbs-default
  - RunningJobs         0
  - FreeCPUs            4

- CE: ce-4.grid.seed:2119/jobmanager-lcgpbs-default
  - RunningJobs         0
  - FreeCPUs            4

- CE: ce-5.grid.seed:2119/jobmanager-lcgpbs-default
  - RunningJobs         0
  - FreeCPUs            4

- CE: ce-6.grid.seed:2119/jobmanager-lcgpbs-default
  - RunningJobs         0
  - FreeCPUs            4

Identify which CEs have installed particular software (MPICH)


- CE: ce-1.grid.seed:2119/jobmanager-lcgpbs-default
  - Tag                 GRIDSEED-1
                        SI00MeanPerCPU_1167           
                        SF00MeanPerCPU_1077           
                        LCG-2                         
                        LCG-2_1_0                     
                        LCG-2_1_1                     
                        LCG-2_2_0                     
                        LCG-2_3_0                     
                        LCG-2_3_1                     
                        LCG-2_4_0                     
                        LCG-2_5_0                     
                        LCG-2_6_0                     
                        LCG-2_7_0                     
                        GLITE-3_0_0                   
                        GLITE-3_1_0                   
                        R-GMA                         
                        MPICH                         
                        MPICH-1.2.7p1                 
                        MPI-START                     
                        MPICH                         
                        MPI_NO_SHARED_HOME            
                        VO-gridseed-tut-tsSoft-2.2.5  

Note: MPI tags are here repeated due to a small bug in gLite/Gridseed middleware installation procedure: this will be fixed soon...

Identify the closeSE for all the CEs

[user01@ui-1 ~]$ lcg-info --vo gridseed  --list-ce --attrs "CloseSE"
- CE: ce-1.grid.seed:2119/jobmanager-lcgpbs-defaults
  - CloseSE             se-1.grid.seed

2.7  More complex queries: integrate lcg-info with other unix commands via the --sed option


lcg-info command can be coupled with unix commanbd by means of the options --sed and --quiet. The --sed option allows to filter the output of the lcg-info using UNIX commands like sed aswk etc.. . The --quiet option avoids the generation of warning messages that can generate mistakes when filtering the output of the lcg-info command. The command line below obtain a list of CEs sorted by TotalCPUs attribute

[user02@ui-1 ~]$ lcg-info --list-ce --vo gridseed  -attrs 'TotalCPUs' --sed | sed s/%/' '/g |
\awk '{ printf("%s\t%s\n",$2,$1); }' | sort -nr 
4	ce-6.grid.seed:2119/jobmanager-lcgpbs-default
4	ce-5.grid.seed:2119/jobmanager-lcgpbs-default
4	ce-4.grid.seed:2119/jobmanager-lcgpbs-default
4	ce-3.grid.seed:2119/jobmanager-lcgpbs-default
4	ce-1.grid.seed:2119/jobmanager-lcgpbs-default

3.  Submit your first job

3.1  Short introduction


User's applications are generally executed by submitting them onto as jobs. The Workload Management System (WMS) (set of gLite services) is responsible for accepting jobs submitted by the user. Then those jobs are dispatched to appropriate CEs depending on the job requirements and the available resources. The submission of a job requires GSI authentication between both the user interface and the WMS and between WMS and the CE. Therefore when submitting, monitoring or retrieving a job output use of a valid proxy certificate is a must. The validity of the certificate should be higher than the execution time of the job. A special file called the job description file is used to indicate various parameters related to the submitted job. Job description files are written using Job Description Language (JDL). The JDL is used to specify the desired job characteristics and constraints, which are used by the match-making process to select the resources that the job will use. The WMS retrieves information from the Information System (IS) and the File Catalog and look for the best CE, given the requirement of the submitted job (as given in the job description file). This search process is called \u201cmatch making\u201d.

3.2  My first jdl file


The following simple JDL file is preloaded in the /opt/examples/GettingStarted directory of the ui-1. Create it using your favourite text editor (pico, nano, emacs, vi) and name it hello.jdl.

[
  Executable = "/bin/echo";
  VirtualOrganisation = "gridseed";
  Arguments = "Hello from $HOSTNAME";
  StdOutput = "hello.out";
  StdError = "hello.err";
  ShallowRetryCount = 0;
  OutputSandbox = {"hello.out", "hello.err"};
]

The Executable attribute specifies the command to be run on the Worker Node. The OutputSandbox attribute indicates the files you want to be copied back after job execution; normally these are files where output and error streams are redirected; their names are determined by the StdOutput and StdError attributes respectively. Also the number of retries is specified (ShallowRetryCount), in case of failures.

3.3  Credentials delegation


All the interactions with WMS are actually done through the WMProxy web service that requires a proxy itself. This is actually done by means of credential delegation procedure. There are two options here:

  • The user can manually perform this operation using the command below and specifying the delegationId to be associated with the delegated proxy:
glite-wms-job-delegate-proxy -d $USER

Using -d option, the delegation is created, and its name is hold (in this case, the value of the environment variable USER, that is, the login name), so that subsequent invocations of glite-wms-job-submit and glite-wms-job-list-match can be given that delegation name, bypassing the delegation of a new proxy. So, when calling glite-wms-job-submit and glite-wms-job-list-match the delegation name is given with the -d option.

  • The user can use on all the glite-wms* commands the -a option, which causes a delegated proxy to be established automatically. However massive use of this option it's not recommended, since it delegates a new proxy for each command issued, and delegation is a time-consuming operation, so it's better to do it once with glite-wms-job-delegate-proxy and reuse it.

In the following we will create a delegation towards WMProxy using as identifier our username, that you can get from the environment variable $USER.

[user02@ui-1 ~]$ echo $USER
user02
[user02@ui-1 ~]$ glite-wms-job-delegate-proxy -d $USER

Connecting to the service https://wms.grid.seed:7443/glite_wms_wmproxy_server


================== glite-wms-job-delegate-proxy Success ==================

Your proxy has been successfully delegated to the WMProxy:
https://wms.grid.seed:7443/glite_wms_wmproxy_server

with the delegation identifier: user02

==========================================================================

3.4  Job List Match


A JDL (Job Description Language) file describes the requirements of the task we want to run on the grid. It is wise, before running it, to check which computing elements (CE's) are able to match such requirements and accept it. This can be done glite-wms-job-list-match command. This command interacts with the WMproxy service and therefore requires the delegated proxy we created before. As you can see, with "-d" option allows you to specify the delegation identifier you have created. Since we did it using the username (as get from $USER), this is the value we give to the option.

[user02@ui-1 ~]$ glite-wms-job-list-match -d $USER  hello.jdl

Connecting to the service https://wms.grid.seed:7443/glite_wms_wmproxy_server

==========================================================================

		     COMPUTING ELEMENT IDs LIST 
 The following CE(s) matching your job requirements have been found:

	*CEId*
 - ce-1.grid.seed:2119/jobmanager-lcgpbs-default
 - ce-3.grid.seed:2119/jobmanager-lcgpbs-default
 - ce-4.grid.seed:2119/jobmanager-lcgpbs-default
 - ce-5.grid.seed:2119/jobmanager-lcgpbs-default
 - ce-6.grid.seed:2119/jobmanager-lcgpbs-default

==========================================================================

3.5  Job Submission


We are now ready to submit our simple job by means of glite-wms-job-submit command. We will use -d flag (for the delegated proxy and -o to save the job identfier on a file to later check the status of our job.

[user02@ui-1 ~]$ glite-wms-job-submit -d $USER -o jobid  hello.jdl

Connecting to the service https://wms.grid.seed:7443/glite_wms_wmproxy_server


====================== glite-wms-job-submit Success ======================

The job has been successfully submitted to the WMProxy
Your job identifier is:

https://wms.grid.seed:9000/zutRegdvRwsPjpGxHDpXbw

The job identifier has been saved in the following file:
/home/user02/jobid

==========================================================================

The file /home/user02/jobid contains the jobID(s) (https://wms.grid.seed:9000/zutRegdvRwsPjpGxHDpXbw) returned by the submission process. If another job is submitted specifying the same output file, its jobID is appended.

3.6  Job Status


In order to know about the job status another command is available: glite-wms-job-status; this command requires as ipnut the Job Identifiers and then queries LB (Logging and Bookkeeping service) on the status of the job. No delegation is needed for this command.

[user02@ui-1 ~]$ glite-job-status -i jobid


*************************************************************
BOOKKEEPING INFORMATION:

Status info for the Job : https://wms.grid.seed:9000/zutRegdvRwsPjpGxHDpXbw
Current Status:     Scheduled 
Status Reason:      Job successfully submitted to Globus
Destination:        ce-6.grid.seed:2119/jobmanager-lcgpbs-default
Submitted:          Mon Aug 17 16:21:08 2009 CEST
*************************************************************

If the option -i input_file is specified the command will scan the input_file to check for jobids and inform the user if different job identifiers are present and ask for specific actions as specified here below:

[user02@ui-1 ~]$ glite-wms-job-status -i jobid

------------------------------------------------------------------
1 : https://wms.grid.seed:9000/zutRegdvRwsPjpGxHDpXbw
2 : https://wms.grid.seed:9000/XTXQ-HRFb6XITjbAfdI0BA
a : all
q : quit
------------------------------------------------------------------

Choose one or more jobId(s) in the list - [1-2]all:



*************************************************************
BOOKKEEPING INFORMATION:

Status info for the Job : https://wms.grid.seed:9000/zutRegdvRwsPjpGxHDpXbw
Current Status:     Scheduled 
Status Reason:      Job successfully submitted to Globus
Destination:        ce-6.grid.seed:2119/jobmanager-lcgpbs-default
Submitted:          Mon Aug 17 16:21:08 2009 CEST
*************************************************************


*************************************************************
BOOKKEEPING INFORMATION:

Status info for the Job : https://wms.grid.seed:9000/XTXQ-HRFb6XITjbAfdI0BA
Current Status:     Scheduled 
Status Reason:      Job successfully submitted to Globus
Destination:        ce-3.grid.seed:2119/jobmanager-lcgpbs-default
Submitted:          Mon Aug 17 16:23:24 2009 CEST
*************************************************************


In the above examples we can see that the we have submitted two Jobs and the current satus shows that they are scheduled.

[user02@ui-1 ~]$ glite-wms-job-status -i jobid

------------------------------------------------------------------
1 : https://wms.grid.seed:9000/zutRegdvRwsPjpGxHDpXbw
2 : https://wms.grid.seed:9000/XTXQ-HRFb6XITjbAfdI0BA
a : all
q : quit
------------------------------------------------------------------

Choose one or more jobId(s) in the list - [1-2]all:1



*************************************************************
BOOKKEEPING INFORMATION:

Status info for the Job : https://wms.grid.seed:9000/zutRegdvRwsPjpGxHDpXbw
Current Status:     Running 
Status Reason:      Job successfully submitted to Globus
Destination:        ce-6.grid.seed:2119/jobmanager-lcgpbs-default
Submitted:          Mon Aug 17 16:21:08 2009 CEST
*************************************************************

In the above examples we can see that the we have submitted two Jobs and the current status shows that the first job is running.


[user02@ui-1 ~]$ glite-wms-job-status -i jobid

------------------------------------------------------------------
1 : https://wms.grid.seed:9000/zutRegdvRwsPjpGxHDpXbw
2 : https://wms.grid.seed:9000/XTXQ-HRFb6XITjbAfdI0BA
a : all
q : quit
------------------------------------------------------------------

Choose one or more jobId(s) in the list - [1-2]all:1



*************************************************************
BOOKKEEPING INFORMATION:

Status info for the Job : https://wms.grid.seed:9000/zutRegdvRwsPjpGxHDpXbw
Current Status:     Done (Success)
Logged Reason(s):
    - 
    - Job terminated successfully
Exit code:          0
Status Reason:      Job terminated successfully
Destination:        ce-6.grid.seed:2119/jobmanager-lcgpbs-default
Submitted:          Mon Aug 17 16:21:08 2009 CEST
*************************************************************

The current job status shows that the Job is done successfully.

3.7  Job Output


As soon as the glite-job-status command reports that job has been succesfully completed, the result can be retrieved by the command: glite-wms-job-output. The command requires the Jobid and can accept ( by -i option ) an input file. It will bring back all the files specified in the output sandbox in a directory. Again You don't need to specify a delegation identifier for this command. Please note that this command by default will retrieve the output in rather weird location (/tmp/JobOutput) with rather name as well( taken by the JobID). Much better use the following options to control where the output directory are stored (-o) and named (--dir).

[user02@ui-1 ~]$ glite-wms-job-output -o $PWD --dir job1  -i jobid 

------------------------------------------------------------------
1 : https://wms.grid.seed:9000/zutRegdvRwsPjpGxHDpXbw
2 : https://wms.grid.seed:9000/XTXQ-HRFb6XITjbAfdI0BA
a : all
q : quit
------------------------------------------------------------------

Choose one or more jobId(s) in the list - [1-2]all (use , as separator or - for a range): 1

Connecting to the service https://wms.grid.seed:7443/glite_wms_wmproxy_server



================================================================================

			JOB GET OUTPUT OUTCOME

Output sandbox files for the job:
https://wms.grid.seed:9000/zutRegdvRwsPjpGxHDpXbw
have been successfully retrieved and stored in the directory:
/home/user02/job1

================================================================================

In order to inspect the job output, list the files in the indicated directory and show the content of the output file(s).

[user02@ui-1 ~]$ ls -al job1/
total 12
drwxr-xr-x  2 user02 user02 4096 Aug 18 10:58 .
drwx------  4 user02 user02 4096 Aug 18 10:57 ..
-rw-rw-r--  1 user02 user02    0 Aug 18 10:57 hello.err
-rw-rw-r--  1 user02 user02   29 Aug 18 10:59 hello.out
[user02@ui-1 ~]$  cat job1/hello.err 
[user02@ui-1 ~]$  cat job1/hello.out 
Hello from ce-6wn4.grid.seed

3.8  Job Cancel


If anything goes wrong a job can be cancelled by the command: glite-wms-job-cancel Again the -i option is also available (especially useful in order to cancel more files with a single command):


[user02@ui-1 ~]$ glite-wms-job-cancel -i jobid 

In this case the job was not cancelled because it has been already succesfully completed - the status "cleared" shows that we have already retrieved the output.