QueryingBDII

From T2B Wiki
Jump to navigation Jump to search

What you will find on this page

Some useful commands, mainly based on ldapsearch, to extract meaningful information from BDII.

Some useful links to documentation

https://wiki.egi.eu/wiki/USG_Using_LDAP_Search

http://gridinfo.web.cern.ch/developers/resource-bdii

https://wiki.egi.eu/wiki/FAQ10_EGI_Federated_Cloud_User#Site_information

Useful commands

Get the list of top-bdii's

lcg-infosites --vo all bdii_top

Get the list of VOs supported by the CEs from a given country

Example for UK :

ldapsearch -x -h top-bdii.cern.ch -p 2170 -b o=grid "(&(objectclass=GlueCE)(GlueCEUniqueID=*.ac.uk*))" | grep "GlueCEAccessControlBaseRule: VO:" | sort | uniq | cut -d: -f3

List of CEs from a given country

Example for UK :

ldapsearch -x -h top-bdii.cern.ch -p 2170 -b o=grid "(GlueCEUniqueID=*.ac.uk*)" GlueCEInfoHostName | grep GlueCEInfoHostName: | sort | uniq | cut -d: -f2

List of all sites that have a CE

ldapsearch -x -h top-bdii.cern.ch -p 2170 -b o=grid "(objectclass=GlueCE)" dn | egrep -e "^#(.*), local, grid$" | cut -d, -f 2 | sort | uniq

List of CEs of a given site

Example for BEgrid-ULB-VUB :

ldapsearch -x -h top-bdii.cern.ch -p 2170 -b o=grid "(objectclass=GlueCE)" dn | egrep -e "^#(.*), local, grid$" | grep BEgrid-ULB-VUB | cut -d: -f1 | tr -d '# ' | sort | uniq

List of CEs supporting a given VO

Example for beapps :

ldapsearch -x -h top-bdii.cern.ch -p 2170 -b o=grid "(&(objectclass=GlueCE)(GlueCEAccessControlBaseRule=VO:beapps))" dn | egrep -e "^#(.*), local, grid$" | cut -d: -f1 | tr -d '# ' | sort | uniq

List of sites having a CE supporting a given VO

Example for beapps :

ldapsearch -x -h top-bdii.cern.ch -p 2170 -b o=grid "(&(objectclass=GlueCE)(GlueCEAccessControlBaseRule=VO:beapps))" dn | egrep -e "^#(.*), local, grid$" | cut -d, -f2 | sort | uniq

List of sites exposing cloud IaaS resources

(Found here)

ldapsearch -x -H ldap://lcg-bdii.cern.ch:2170 -b GLUE2GroupID=grid,o=glue "GLUE2ServiceType=IaaS" | grep GLUE2ServiceAdminDomainForeignKey

Get the OCCI endpoint to access the cloud of a given site

ldapsearch -x -H ldap://lcg-bdii.cern.ch:2170 -b GLUE2DomainID=<site_name>,GLUE2GroupID=grid,o=glue GLUE2EndpointInterfaceName=OCCI | grep GLUE2EndpointURL