Information System BDII
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.
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.
The gLite Information system clients
In this section, two higher level tools will be presented:
lcg-infosites and
lcg-info.
These tools should be enough for most common user needs and will usually avoid the necessity of raw LDAP queries.
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:
[morgan@localhost ~]$ lcg-infosites --vo planck ce
#CPU Free Total Jobs Running Waiting ComputingElement
----------------------------------------------------------
475 359 0 0 0 hepgrid2.ph.liv.ac.uk:2119/jobmanager-lcgpbs-planck
77 77 0 0 0 ce01.esac.esa.int:2119/jobmanager-lcgpbs-bpg
308 187 0 0 0 fal-pygrid-18.lancs.ac.uk:2119/jobmanager-lcgpbs-planck
[...]
[morgan@localhost ~]$ lcg-infosites --vo planck ce -v 1
hepgrid2.ph.liv.ac.uk:2119/jobmanager-lcgpbs-planck
ce01.esac.esa.int:2119/jobmanager-lcgpbs-bpg
fal-pygrid-18.lancs.ac.uk:2119/jobmanager-lcgpbs-planck
gridce.pi.infn.it:2119/jobmanager-lcglsf-grid4
egeece01.ifca.es:2119/jobmanager-lcgpbs-planck
gridba2.ba.infn.it:2119/jobmanager-lcgpbs-long
[...]
Getting information on storage elements (SE)
The following command lists all the available computing queues for the given VO
[morgan@localhost ~]$ lcg-infosites --vo planck se
Avail Space(Kb) Used Space(Kb) Type SEs
----------------------------------------------------------
n.a n.a n.a hepgrid5.ph.liv.ac.uk
105650000 n.a n.a griddpm01.ifca.es
2450000000 n.a n.a se01.ariagni.hellasgrid.gr
730170000 14347 n.a se01.afroditi.hellasgrid.gr
1 1 n.a cmsdcache.pi.infn.it
131070693 1307 n.a heplnx204.pp.rl.ac.uk
[...]
The same command above using the -v 1 option display only the fqhn of the SE.
It is possible to change the BDII using the
--is
option
lcg-infosites --vo planck -v 1 ce --is bdii.isabella.grnet.gr
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.
[morgan@localhost ~]$ lcg-infosites --vo planck closeSE
Name of the CE: hepgrid2.ph.liv.ac.uk:2119/jobmanager-lcgpbs-planck
hepgrid5.ph.liv.ac.uk
Name of the CE: ce01.esac.esa.int:2119/jobmanager-lcgpbs-bpg
se01.esac.esa.int
[...]
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".
[morgan@localhost ~]$ lcg-info --list-attrs
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
[...]
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)
[morgan@localhost ~]$ lcg-info --vo planck --list-ce --query 'TotalCPUs = 10' --attrs 'RunningJobs,FreeCPUs'
- CE: gridce.sns.it:2119/jobmanager-lcgpbs-grid
- RunningJobs 0
- FreeCPUs 7
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:
[morgan@localhost ~]$ lcg-info --vo planck --list-ce --attrs Tag
- CE: prod-ce-02.pd.infn.it:2119/jobmanager-lcglsf-grid
- Tag LCG-2
LCG-2_1_0
LCG-2_1_1
[...]
MPICH
MPI_NO_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:
[morgan@localhost ~]$ lcg-info --vo planck --list-ce --query 'Tag=MPICH' --attrs 'FreeCPUs,Tag'
- CE: prod-ce-02.pd.infn.it:2119/jobmanager-lcglsf-grid
- FreeCPUs 1
- Tag LCG-2
LCG-2_1_0
LCG-2_1_1
LCG-2_2_0
LCG-2_3_0
[...]
Using 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.
[morgan@localhost ~]$ ldapsearch -x -LLL -H ldap://atlasce01.na.infn.it:2135 -b "mds-vo-name=local,o=grid"
dn: GlueSiteUniqueID=INFN-NAPOLI-ATLAS,mds-vo-name=local,o=grid
objectClass: GlueTop
objectClass: GlueSite
objectClass: GlueKey
objectClass: GlueSchemaVersion
GlueSiteUniqueID: INFN-NAPOLI-ATLAS
GlueSiteName: INFN-NAPOLI-ATLAS
GlueSiteDescription: LCG Site
GlueSiteUserSupportContact: mailto:grid-prod@na.infn.it
GlueSiteSysAdminContact: mailto:grid-prod@na.infn.it
GlueSiteSecurityContact: mailto:grid-prod@na.infn.it
GlueSiteLocation: Napoli, Italy
GlueSiteLatitude: 40.8527
GlueSiteLongitude: 14.2363
GlueSiteWeb: http://www.na.infn.it
GlueSiteSponsor: none
GlueSiteOtherInfo: TIER-2
GlueSiteOtherInfo: CNAF-T1
GlueForeignKey: GlueSiteUniqueID=INFN-NAPOLI-ATLAS
GlueSchemaVersionMajor: 1
GlueSchemaVersionMinor: 2
[...]
Equivalently
[morgan@localhost ~]$ ldapsearch -x -LLL -b atlasce01.na.infn.it -p 2135 -b "mds-vo-name=local,o=grid"
[morgan@localhost ~]$ ldapsearch -x -LLL -h atlasce01.na.infn.it:2135 -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:
Operator |
Description |
= |
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:
[morgan@localhost ~]$ ldapsearch -LLL -x -h egeece01.ifca.es -p 2170 -b "mds-vo-name=resource, o=grid" 'objectClass=GlueCETop' GlueCEStateTotalJobs
[morgan@localhost ~]$ ldapsearch -LLL -x -h egeece01.ifca.es -p 2170 -b "mds-vo-name=resource, o=grid" '(objectClass=GlueCETop)' GlueCEStateTotalJobs
dn: GlueCEUniqueID=egeece01.ifca.es:2119/jobmanager-lcgpbs-fusion,Mds-Vo-name=resource,o=grid
GlueCEStateTotalJobs: 0
dn: GlueCEUniqueID=egeece01.ifca.es:2119/jobmanager-lcgpbs-biomed,Mds-Vo-name=resource,o=grid
GlueCEStateTotalJobs: 2
dn: GlueVOViewLocalID=fusion,GlueCEUniqueID=egeece01.ifca.es:2119/jobmanager-lcgpbs-fusion,Mds-Vo-name=resource,o=grid
GlueCEStateTotalJobs: 0
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
[morgan@localhost ~]$ ldapsearch -LLL -x -h egeece01.ifca.es -p 2170 -b "mds-vo-name=resource, o=grid" '(GlueCEStateTotalJobs>=2)'
dn: GlueCEUniqueID=egeece01.ifca.es:2119/jobmanager-lcgpbs-biomed,Mds-Vo-name=resource,o=grid
objectClass: GlueCETop
objectClass: GlueCE
objectClass: GlueCEAccessControlBase
[...]
otherwhise
[morgan@localhost ~]$ ldapsearch -LLL -x -h egeece01.ifca.es -p 2170 -b "mds-vo-name=resource, o=grid" '(GlueCEStateTotalJobs>=2)' GlueCEStateTotalJobs
dn: GlueCEUniqueID=egeece01.ifca.es:2119/jobmanager-lcgpbs-biomed,Mds-Vo-name=resource,o=grid
GlueCEStateTotalJobs: 2
dn: GlueVOViewLocalID=cms,GlueCEUniqueID=egeece01.ifca.es:2119/jobmanager-lcgpbs-cms,Mds-Vo-name=resource,o=grid
GlueCEStateTotalJobs: 257
dn: GlueCEUniqueID=egeece01.ifca.es:2119/jobmanager-lcgpbs-cms,Mds-Vo-name=resource,o=grid
GlueCEStateTotalJobs: 257
dn: GlueVOViewLocalID=biomed,GlueCEUniqueID=egeece01.ifca.es:2119/jobmanager-lcgpbs-biomed,Mds-Vo-name=resource,o=grid
GlueCEStateTotalJobs: 2
A more complex filter to get values for
GlueCEStateTotalJobs and
GlueCEStateWaitingJobs
[morgan@localhost ~]$ ldapsearch -LLL -x -h egeece01.ifca.es -p 2170 -b "mds-vo-name=resource, o=grid" '(&(GlueCEStateTotalJobs>=2)(GlueCEStateWaitingJobs=1))' GlueCEStateTotalJobs
dn: GlueCEUniqueID=egeece01.ifca.es:2119/jobmanager-lcgpbs-biomed,Mds-Vo-name=esource,o=grid
dn: GlueVOViewLocalID=biomed,GlueCEUniqueID=egeece01.ifca.es:2119/jobmanager-lcgpbs-biomed,Mds-Vo-name=resource,o=grid
[morgan@localhost ~]$ ldapsearch -LLL -x -h egeece01.ifca.es -p 2170 -b "mds-vo-name=resource, o=grid" '(&(GlueCEStateTotalJobs>=2)(GlueCEStateWaitingJobs=1))' GlueCEStateTotalJobs
dn: GlueCEUniqueID=egeece01.ifca.es:2119/jobmanager-lcgpbs-biomed,Mds-Vo-name=resource,o=grid
GlueCEStateTotalJobs: 2
dn: GlueVOViewLocalID=biomed,GlueCEUniqueID=egeece01.ifca.es:2119/jobmanager-lcgpbs-biomed,Mds-Vo-name=resource,o=grid
GlueCEStateTotalJobs: 2
A much complex search that involves also objectclass matching:
[morgan@localhost ~]$ ldapsearch -LLL -x -h egeece01.ifca.es -p 2170 -b "mds-vo-name=resource, o=grid" '(&(|(GlueCEStateTotalJobs>=2)(GlueCEStateWaitingJobs=1))(objectclass=GlueTop))' GlueCEStateTotalJobs GlueCEStateWaitingJobs
dn: GlueCEUniqueID=egeece01.ifca.es:2119/jobmanager-lcgpbs-biomed,Mds-Vo-name=
resource,o=grid
GlueCEStateTotalJobs: 2
GlueCEStateWaitingJobs: 1
dn: GlueVOViewLocalID=cms,GlueCEUniqueID=egeece01.ifca.es:2119/jobmanager-lcgp
bs-cms,Mds-Vo-name=resource,o=grid
GlueCEStateWaitingJobs: 144
GlueCEStateTotalJobs: 235
dn: GlueCEUniqueID=egeece01.ifca.es:2119/jobmanager-lcgpbs-cms,Mds-Vo-name=res
ource,o=grid
GlueCEStateTotalJobs: 235
GlueCEStateWaitingJobs: 144
dn: GlueVOViewLocalID=biomed,GlueCEUniqueID=egeece01.ifca.es:2119/jobmanager-l
cgpbs-biomed,Mds-Vo-name=resource,o=grid
GlueCEStateWaitingJobs: 1
GlueCEStateTotalJobs: 2
References
--
TaffoniGiuliano - 18 Aug 2008