Information System
1. Introduction
A fundamental aspect of a grid is the information system, which is used to find available grid services. There are two main information services in gLite: the BDII and the R-GMA.
2. The BDII
The BDII is a LDAP-based information system that uses the Globus GRIS and an information schema based on Glue standards. A site BDII collects the GRIS information gathered by the various services and a Top BDII collects all the sites information querying the sites BDII.
A user or an application can query the BDII both using the standards ldap tools or using the glite-tools.
3. The gLite Information system clients
In this section, two higher, lcg-infosites and lcg-info, and one lower level tool, ldapsearch, will be presented. Higher level tools should be enough for most common user needs and will usually avoid the necessity of raw LDAP queries.
3.1 lcg-infosites
Usage: lcg-infosites --vo options -v --is
Description of the Attributes:
| --vo | The name of the user vo (mandatory). Please notice that lcg-infosites does not use your VOMS proxy certificate, for this reason it is necessary to specify the VO | |
| options: The tool admits the following options: | ||
| ce | The information related to number of CPUs, running jobs, waiting jobs and names of the CEs are provided. All these data group all VOs together. | |
| -v 1 | Only the names of the queues will be printed. | |
| -v 2 | The RAM Memory together with the operating system and its version and the processor included in each CE are printed. | |
| se | The names of the SEs supported by the user’s VO together with the kind of Storage System, the used and available space will be printed. | |
| -v 1 | Only the names of the SEs will be printed. | |
| closeSE | The names of the CEs where the user’s VO is allowed to run together with their corresponding closest SEs are provided. | |
| lrc/rmc | The name of the lrc/rmc corresponding to the user's VO | |
| lfc | The name of the machine hosting the LFC catalog is printed. | |
| tag | The names of the tags relative to the software installed in site is printed together with the corresponding CE. | |
| all | It groups together the information provided by ce, se, lrc and rmc. | |
| is | If not specified the BDII defined in default by the variable LCG GFAL INFOSYS will be queries. However the user may want to query any other BDII without redefining this environment variable. This is possible specifying this argument followed by the name of the BDII which the user wants to query. All options admits this argument | |
Getting information on computing elements (CE)
The following command lists the computing elements available in the planck VO:
[user@ui-1 ~]$ lcg-infosites --vo gridbox ce valor del bdii: test-bdii.grid.box:2170 #CPU Free Total Jobs Running Waiting ComputingElement ---------------------------------------------------------- 4 4 0 0 0 ce-2.grid.box:2119/jobmanager-lcgpbs-gridbox 4 4 1 0 1 ce-1.grid.box:2119/jobmanager-lcgpbs-gridbox 4 4 1 0 1 ce-3.grid.box:2119/jobmanager-lcgpbs-gridbox [user@ui-1 ~]$ lcg-infosites --vo gridbox ce -v 1 valor del bdii: test-bdii.grid.box:2170 ce-2.grid.box:2119/jobmanager-lcgpbs-gridbox ce-1.grid.box:2119/jobmanager-lcgpbs-gridbox ce-3.grid.box:2119/jobmanager-lcgpbs-gridbox
Getting information on storage elements (SE)
The following command lists all the available computing queues for the given VO
[user@ui-1 ~]$ lcg-infosites --vo gridbox se Avail Space(Kb) Used Space(Kb) Type SEs ---------------------------------------------------------- 47628920 86084 n.a se-3.grid.box 48770000 17 n.a dpm.grid.box 47628868 86136 n.a se-2.grid.box 47628864 86140 n.a se-1.grid.box 47628868 86136 n.a se-2.grid.box 47628920 86084 n.a se-3.grid.box 47628864 86140 n.a se-1.grid.box
The same command above using the -v 1 option display only the fqhn of the SE.
[user@ui-1 ~]$ lcg-infosites --vo gridbox se -v 1 se-3.grid.box dpm.grid.box se-2.grid.box se-1.grid.box se-2.grid.box se-3.grid.box se-1.grid.box
It is possible to change the BDII using the --is option
[user@ui-1 ~]$ lcg-infosites --vo gridbox se --is ce-1.grid.box Avail Space(Kb) Used Space(Kb) Type SEs ---------------------------------------------------------- 47628864 86140 n.a se-1.grid.box 48770000 17 n.a dpm.grid.box 47628864 86140 n.a se-1.grid.box
Getting binding information between CE and SE
It is also possible to obtain a list of storag elements (SE) closest to each computing element (CE). The term "close" in grids 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.
[user@ui-1 ~]$ lcg-infosites --vo gridbox closeSE
valor del bdii: test-bdii.grid.box:2170
Name of the CE: ce-2.grid.box:2119/jobmanager-lcgpbs-gridbox
se-2.grid.box
Name of the CE: ce-1.grid.box:2119/jobmanager-lcgpbs-gridbox
se-1.grid.box
Name of the CE: ce-3.grid.box:2119/jobmanager-lcgpbs-gridbox
se-3.grid.box
3.2 lcg-info
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.
Usage: lcg-info [--list-ce | --list-se] [--query ] [--attrs ]
| --help | Prints the manual page and exits |
| --list-attrs | Prints a list of the attributes that can be queried. |
| --list-ce | Lists the CEs which satisfy a query, or all the CEs if no query is given. |
| --list-se | Lists the SEs which satisfy a query, or all the SEs if no query is given. |
| --query | Restricts the output to the CEs (SEs) which satisfy the given query. |
| --bdii | Allows to specify a BDII in the form :. If not given, the value of the environmental variable #LCG_GFAL_INFOSYS# is used. If that is not defined, the command returns an error. |
| --sed | Prints the output in a "sed-friendly" format: "%" separate the CE (SE) identifier and the printed attributes, "&" separate the values of multi-valued attributes. |
| --quiet | Suppresses warning messages. |
| --attrs | Specifies the attributes whose values should be printed. |
| --vo | Restricts the output to CEs or SEs where the given VO is autho-rized. Mandatory when VO-dependent attributes are queried upon. |
The first step is to view the list of all available attributes for both the matching and printing aspects of "lcg-info".
[user@ui-1 ~]$ lcg-info --list-attr Attribute name Glue object class Glue attribute name WorstRespTime GlueCE GlueCEStateWorstResponseTime CEAppDir GlueCE GlueCEInfoApplicationDir TotalCPUs GlueCE GlueCEInfoTotalCPUs MaxRunningJobs GlueCE GlueCEPolicyMaxRunningJobs CE GlueCE GlueCEUniqueID WaitingJobs GlueCE GlueCEStateWaitingJobs MaxCPUTime GlueCE GlueCEPolicyMaxCPUTime LRMSVersion GlueCE GlueCEInfoLRMSVersion MaxTotalJobs GlueCE GlueCEPolicyMaxTotalJobs CEStatus GlueCE GlueCEStateStatus LRMS GlueCE GlueCEInfoLRMSType CEVOs GlueCE GlueCEAccessControlBaseRule AssignedJobSlots GlueCE GlueCEPolicyAssignedJobSlots FreeCPUs GlueCE GlueCEStateFreeCPUs RunningJobs GlueCE GlueCEStateRunningJobs EstRespTime GlueCE GlueCEStateEstimatedResponseTime FreeJobSlots GlueCE GlueCEStateFreeJobSlots TotalJobs GlueCE GlueCEStateTotalJobs Priority GlueCE GlueCEPolicyPriority CEDefaultSE GlueCE GlueCEInfoDefaultSE MaxWCTime GlueCE GlueCEPolicyMaxWallClockTime Accesspoint GlueCESEBind GlueCESEBindCEAccesspoint CloseCE GlueCESEBindGroup GlueCESEBindGroupCEUniqueID CloseSE GlueCESEBindGroup GlueCESEBindGroupSEUniqueID Root GlueSA GlueSARoot AvailableSpace GlueSA GlueSAStateAvailableSpace Path GlueSA GlueSAPath SEVOs GlueSA GlueSAAccessControlBaseRule UsedSpace GlueSA GlueSAStateUsedSpace SESite GlueSE GlueForeignKey SEType GlueSE GlueSEType SEArch GlueSE GlueSEArchitecture SEName GlueSE GlueSEName SE GlueSE GlueSEUniqueID SEPort GlueSE GlueSEPort Protocol GlueSEAccessProtocol GlueSEAccessProtocolType ArchType GlueSL GlueSLArchitectureType ServiceID GlueService GlueServiceUniqueID ServiceOwner GlueService GlueServiceOwner ServiceWSDL GlueService GlueServiceWSDL ServiceName GlueService GlueServiceName ServiceVersion GlueService GlueServiceVersion ServiceEndpoint GlueService GlueServiceEndpoint ServiceSite GlueService GlueForeignKey ServiceStatusInfo GlueService GlueServiceStatusInfo ServiceVOs GlueService GlueServiceAccessControlRule ServiceAccesspoint GlueService GlueServiceAccessPointURL ServiceURI GlueService GlueServiceURI ServiceType GlueService GlueServiceType ServiceStatus GlueService GlueServiceStatus SiteSupport GlueSite GlueSiteUserSupportContact SiteName GlueSite GlueSiteName SiteAdmin GlueSite GlueSiteSysAdminContact SiteDesc GlueSite GlueSiteDescription SiteLocation GlueSite GlueSiteLocation SiteSecurity GlueSite GlueSiteSecurityContact SiteInfo GlueSite GlueSiteOtherInfo SiteID GlueSite GlueSiteUniqueID SMPSize GlueSubCluster GlueHostArchitectureSMPSize Processor GlueSubCluster GlueHostProcessorModel OSVersion GlueSubCluster GlueHostOperatingSystemVersion CFP2000 GlueSubCluster GlueHostBenchmarkSF00 OSRelease GlueSubCluster GlueHostOperatingSystemRelease ClockSpeed GlueSubCluster GlueHostProcessorClockSpeed OS GlueSubCluster GlueHostOperatingSystemName Cluster GlueSubCluster GlueSubClusterUniqueID Tag GlueSubCluster GlueHostApplicationSoftwareRunTimeEnvironment CINT2000 GlueSubCluster GlueHostBenchmarkSI00 Memory GlueSubCluster GlueHostMainMemoryRAMSize VORunningJobs GlueVOView GlueCEStateRunningJobs VOTotalJobs GlueVOView GlueCEStateTotalJobs VOWorstRespTime GlueVOView GlueCEStateWorstResponseTime VOEstRespTime GlueVOView GlueCEStateEstimatedResponseTime VOCEVOs GlueVOView GlueCEAccessControlBaseRule VOFreeJobSlots GlueVOView GlueCEStateFreeJobSlots VOWaitingJobs GlueVOView GlueCEStateWaitingJobs
For each attribute, the simplified attribute name (1st column) is used by lcg-info, the corresponding object class and the attribute name in the GLUE schema are given (2nd and 3rd columns). These values are just a subset of all the possible values of the LDAP implementation of the GLUE schema.
Simple queries
List all the Computing Elements in the BDII satisfying the given conditions (TotalCPUs=10) and print the desired attributes (FreeCPUs,!TotalJobs)
[user@ui-1 ~]$ lcg-info --vo gridbox --list-ce --query 'TotalCPUs = 4' --attrs 'RunningJobs,FreeCPUs' - CE: ce-1.grid.box:2119/jobmanager-lcgpbs-gridbox - RunningJobs 0 - FreeCPUs 4 - CE: ce-2.grid.box:2119/jobmanager-lcgpbs-gridbox - RunningJobs 0 - FreeCPUs 4 - CE: ce-3.grid.box:2119/jobmanager-lcgpbs-gridbox - RunningJobs 0 - FreeCPUs 4
One of the most common use of the "lcg-info" is to check which software packages are available on CE's. The software packages are stored in the "Tag" attribute and they can be seen by typing:
[user@ui-1 ~]$ lcg-info --vo gridbox --list-ce --attrs Tag
- CE: ce-1.grid.box:2119/jobmanager-lcgpbs-gridbox
- Tag 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.7p4
MPICH
MPICH-1.2.7p4
MPICH
MPICH-1.2.7p1
MPI-START
MPICH
MPI_NO_SHARED_HOME
- CE: ce-2.grid.box:2119/jobmanager-lcgpbs-gridbox
- Tag 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
OPENMPI
OPENMPI-1.2.7
MPI-START
MPICH
MPI_SHARED_HOME
- CE: ce-3.grid.box:2119/jobmanager-lcgpbs-gridbox
- Tag 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.7p4
OPENMPI
OPENMPI-1.2.7
MPICH
MPICH-1.2.7p4
OPENMPI
OPENMPI-1.2.7
MPICH
MPICH-1.2.7p1
OPENMPI
OPENMPI-1.2.7
MPI-START
MPICH
MPI_SHARED_HOME
Please notice that each value is a string and hence numerical tests on version numbers are not possible when applying matching conditions.
A more complex example of "lcg-info" tool is given below. Suppose you wish to find all sites that support the MPICH package (details of which will be explained on other topics related to job management) and we want to display how many CPU's are available and the other software supported on those sites. It also makes sense to filter out CE's which are not available to the gilda VO. This may be accomplished using:
[user@ui-1 ~]$ lcg-info --vo gridbox --list-ce --query 'Tag=MPICH' --attrs 'FreeCPUs,CloseSE' - CE: ce-1.grid.box:2119/jobmanager-lcgpbs-gridbox - FreeCPUs 4 - CloseSE se-1.grid.box - CE: ce-2.grid.box:2119/jobmanager-lcgpbs-gridbox - FreeCPUs 4 - CloseSE se-2.grid.box - CE: ce-3.grid.box:2119/jobmanager-lcgpbs-gridbox - FreeCPUs 4 - CloseSE se-3.grid.box
Working on SE:
[user@ui-1 ~]$ lcg-info --vo gridbox --list-se --attrs 'Path'
- SE: dpm.grid.box
- Path /dpm/grid.box/home/gridbox
- SE: se-1.grid.box
- Path /gridbox
/gridbox
- SE: se-2.grid.box
- Path /gridbox
/gridbox
- SE: se-3.grid.box
- Path /gridbox
/gridbox
3.3 ldapsearch
It is possible to use ldapsearch to query both the BDII and the local GRIS Information Service. In particular, the different servers from which the information can be obtained are discussed. These are the local GRISes, the site GIISes/BDIIs and the global (or top) BDIIs. Of them, the BDII is usually the one queried, since it contains all the interesting information for a VO in a single place.
The local GRISes running on Computing Elements and Storage Elements at the different sites report information on the characteristics and status of the services. They give both static and dynamic information. In order to interrogate the GRIS on a specific Grid Element, the hostname of the Grid Element and the TCP port where the GRIS run must be specified. Such port is actually 2170. Past releases of GRISes may still have to be set the port number 2135.
[user@ui-1 ~]$ ldapsearch -LLL -x -h se-1.grid.box:2170 -b "mds-vo-name=resource, o=grid" dn: GlueSEAccessProtocolLocalID=root,GlueSEUniqueID=se-1.grid.box,Mds-Vo-name=resource,o=grid objectClass: GlueSETop objectClass: GlueSEAccessProtocol objectClass: GlueKey objectClass: GlueSchemaVersion GlueSEAccessProtocolType: root GlueSEAccessProtocolLocalID: root GlueSEAccessProtocolVersion: 1.0.0 GlueSEAccessProtocolMaxStreams: 1 GlueChunkKey: GlueSEUniqueID=se-1.grid.box GlueSchemaVersionMajor: 1 GlueSchemaVersionMinor: 3 dn: GlueSEAccessProtocolLocalID=gsiftp,GlueSEUniqueID=se-1.grid.box,Mds-Vo-name=resource,o=grid objectClass: GlueSETop objectClass: GlueSEAccessProtocol objectClass: GlueKey objectClass: GlueSchemaVersion GlueSEAccessProtocolType: gsiftp GlueSEAccessProtocolLocalID: gsiftp GlueSEAccessProtocolVersion: 1.0.0 GlueSEAccessProtocolPort: 2811 GlueSEAccessProtocolMaxStreams: 10 GlueChunkKey: GlueSEUniqueID=se-1.grid.box GlueSchemaVersionMajor: 1 GlueSchemaVersionMinor: 3 [...]
Equivalently
[user@ui-1 ~]$ ldapsearch -x -LLL -h se-1.grid.box -p 2170 -b "mds-vo-name=local,o=grid"
The ldapsearch command allows to restrict the search defining a filter of the form: attribute, operator value. The operator is one of the defined in the following table:
| = | Entries whose attribute is equal to the value |
| >= | Entries whose attribute is greater than or equal to the value |
| <= | Entries whose attribute is less than or equal to the value |
| =* | Entries that have a value set for that attribute |
| "= | Entries whose attribute value approximately matches the specified value |
Furthermore, complex search filters can be formed by using boolean operators to combine constraints. The boolean operators that can be used are AND (&), OR (|) and NOT (!). In LDAP, a special attribute ObjectClass is defined for each directory entry. It indicates which object classes are defined for that entry in the LDAP schema. This makes it possible to filter entries that contain a certain object class. The filter for this case would be: 'objectclass=[name]'. Apart from filtering the search, a list of attribute names can be specified, in order to limit the values returned. As shown in the next example, only the value of the specified attributes will be returned.
For example:
[user@ui-1 ~]$ ldapsearch -LLL -x -h ce-1.grid.box -p 2170 -b "mds-vo-name=resource, o=grid" \ '(objectClass=GlueCETop)' GlueCEStateTotalJobs dn: GlueVOViewLocalID=gridbox,GlueCEUniqueID=ce-1.grid.box:2119/jobmanager-lcgpbs-gridbox,Mds-Vo-name=resource,o=grid GlueCEStateTotalJobs: 1 dn: GlueCEUniqueID=ce-1.grid.box:2119/jobmanager-lcgpbs-gridbox,Mds-Vo-name=re source,o=grid GlueCEStateTotalJobs: 1
It prints the value of GlueCEStateTotalJobs for each entry that has an objectclass GlueCETop.
To print the whole tree for GlueCEStateTotalJobs greather equal 2 we use
[user@ui-1 ~]$ ldapsearch -LLL -x -h ce-1.grid.box -p 2170 -b "mds-vo-name=resource, o=grid" \ '(GlueCEStateTotalJobs>=1)' dn: GlueVOViewLocalID=gridbox,GlueCEUniqueID=ce-1.grid.box:2119/jobmanager-lcgpbs-gridbox,Mds-Vo-name=resource,o=grid objectClass: GlueCETop objectClass: GlueVOView objectClass: GlueCEInfo objectClass: GlueCEState objectClass: GlueCEAccessControlBase objectClass: GlueCEPolicy objectClass: GlueKey objectClass: GlueSchemaVersion GlueVOViewLocalID: gridbox GlueCEAccessControlBaseRule: VO:gridbox GlueCEStateRunningJobs: 0 GlueCEStateWaitingJobs: 1 GlueCEStateTotalJobs: 1 GlueCEStateFreeJobSlots: 0 GlueCEStateEstimatedResponseTime: 61193 GlueCEStateWorstResponseTime: 259200 GlueCEInfoDefaultSE: se-1.grid.box GlueCEInfoApplicationDir: /opt/exp_soft/gridbox GlueCEInfoDataDir: unset GlueChunkKey: GlueCEUniqueID=ce-1.grid.box:2119/jobmanager-lcgpbs-gridbox GlueSchemaVersionMajor: 1 GlueSchemaVersionMinor: 3
otherwhise
[user@ui-1 ~]$ ldapsearch -LLL -x -h ce-1.grid.box -p 2170 -b "mds-vo-name=resource, o=grid" \ '(GlueCEStateTotalJobs>=1)' GlueCEStateTotalJobs dn: GlueVOViewLocalID=gridbox,GlueCEUniqueID=ce-1.grid.box:2119/jobmanager-lcgpbs-gridbox,Mds-Vo-name=resource,o=grid GlueCEStateTotalJobs: 1 dn: GlueCEUniqueID=ce-1.grid.box:2119/jobmanager-lcgpbs-gridbox,Mds-Vo-name=resource,o=grid GlueCEStateTotalJobs: 1
A more complex filter to get values for GlueCEStateTotalJobs and GlueCEStateWaitingJobs
[user@ui-1 ~]$ ldapsearch -LLL -x -h ce-1.grid.box -p 2170 -b "mds-vo-name=resource, o=grid" \ '(&(GlueCEStateTotalJobs>=1)(GlueCEStateWaitingJobs=1))' GlueCEStateTotalJobs dn: GlueVOViewLocalID=gridbox,GlueCEUniqueID=ce-1.grid.box:2119/jobmanager-lcgpbs-gridbox,Mds-Vo-name=resource,o=grid GlueCEStateTotalJobs: 1 dn: GlueCEUniqueID=ce-1.grid.box:2119/jobmanager-lcgpbs-gridbox,Mds-Vo-name=resource,o=grid GlueCEStateTotalJobs: 1
A much complex search that involves also objectclass matching:
[user@ui-1 ~]$ ldapsearch -LLL -x -h ce-1.grid.box -p 2170 -b "mds-vo-name=resource, o=grid" \ '(&(|(GlueCEStateTotalJobs>=2)(GlueCEStateWaitingJobs=1))(objectclass=GlueTop))' GlueCEStateTotalJobs GlueCEStateWaitingJobs dn: GlueVOViewLocalID=gridbox,GlueCEUniqueID=ce-1.grid.box:2119/jobmanager-lcg pbs-gridbox,Mds-Vo-name=resource,o=grid GlueCEStateWaitingJobs: 1 GlueCEStateTotalJobs: 1 dn: GlueCEUniqueID=ce-1.grid.box:2119/jobmanager-lcgpbs-gridbox,Mds-Vo-name=re source,o=grid GlueCEStateTotalJobs: 1 GlueCEStateWaitingJobs: 1
