Information System BDII


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 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.


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
  77      77       0              0        0
 308     187       0              0        0

[morgan@localhost ~]$ lcg-infosites --vo planck ce -v 1

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
105650000       n.a             n.a
2450000000      n.a             n.a
730170000       14347           n.a
1               1               n.a
131070693       1307            n.a

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

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:

Name of the CE:


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:
  - 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:
  - Tag                 LCG-2

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:
  - FreeCPUs            1
  - Tag                 LCG-2

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:// -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
GlueSiteDescription: LCG Site
GlueSiteLocation: Napoli, Italy
GlueSiteLatitude: 40.8527
GlueSiteLongitude: 14.2363
GlueSiteSponsor: none
GlueSiteOtherInfo: TIER-2
GlueSiteOtherInfo: CNAF-T1
GlueForeignKey: GlueSiteUniqueID=INFN-NAPOLI-ATLAS
GlueSchemaVersionMajor: 1
GlueSchemaVersionMinor: 2


[morgan@localhost ~]$ ldapsearch -x -LLL -b -p 2135 -b "mds-vo-name=local,o=grid"
[morgan@localhost ~]$ ldapsearch -x -LLL -h -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 -p 2170 -b "mds-vo-name=resource, o=grid"  'objectClass=GlueCETop'  GlueCEStateTotalJobs  
[morgan@localhost ~]$ ldapsearch -LLL -x -h -p 2170 -b "mds-vo-name=resource, o=grid"  '(objectClass=GlueCETop)' GlueCEStateTotalJobs  
GlueCEStateTotalJobs: 0

GlueCEStateTotalJobs: 2

dn: GlueVOViewLocalID=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 -p 2170 -b "mds-vo-name=resource, o=grid"  '(GlueCEStateTotalJobs>=2)'
objectClass: GlueCETop
objectClass: GlueCE
objectClass: GlueCEAccessControlBase
[morgan@localhost ~]$  ldapsearch -LLL -x -h -p 2170 -b "mds-vo-name=resource, o=grid"  '(GlueCEStateTotalJobs>=2)' GlueCEStateTotalJobs
GlueCEStateTotalJobs: 2

dn: GlueVOViewLocalID=cms,,Mds-Vo-name=resource,o=grid
GlueCEStateTotalJobs: 257

GlueCEStateTotalJobs: 257

dn: GlueVOViewLocalID=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 -p 2170 -b "mds-vo-name=resource, o=grid"  '(&(GlueCEStateTotalJobs>=2)(GlueCEStateWaitingJobs=1))' GlueCEStateTotalJobs

dn: GlueVOViewLocalID=biomed,,Mds-Vo-name=resource,o=grid

[morgan@localhost ~]$ ldapsearch -LLL -x -h -p 2170 -b "mds-vo-name=resource, o=grid"  '(&(GlueCEStateTotalJobs>=2)(GlueCEStateWaitingJobs=1))' GlueCEStateTotalJobs
GlueCEStateTotalJobs: 2

dn: GlueVOViewLocalID=biomed,,Mds-Vo-name=resource,o=grid
GlueCEStateTotalJobs: 2

A much complex search that involves also objectclass matching:

[morgan@localhost ~]$ ldapsearch -LLL -x -h -p 2170 -b "mds-vo-name=resource, o=grid"  '(&(|(GlueCEStateTotalJobs>=2)(GlueCEStateWaitingJobs=1))(objectclass=GlueTop))' GlueCEStateTotalJobs GlueCEStateWaitingJobs
GlueCEStateTotalJobs: 2
GlueCEStateWaitingJobs: 1

dn: GlueVOViewLocalID=cms,
GlueCEStateWaitingJobs: 144
GlueCEStateTotalJobs: 235

GlueCEStateTotalJobs: 235
GlueCEStateWaitingJobs: 144

dn: GlueVOViewLocalID=biomed,
GlueCEStateWaitingJobs: 1
GlueCEStateTotalJobs: 2


-- TaffoniGiuliano - 18 Aug 2008

Topic revision: r1 - 18 Aug 2008 - TaffoniGiuliano
This site is powered by the TWiki collaboration platform Powered by Perl This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback