QueryingBDII: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 18: | Line 18: | ||
<pre> | <pre> | ||
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 | 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 | ||
</pre> | |||
=== List of CEs from a given country === | |||
Example for UK : | |||
<pre> | |||
ldapsearch -x -h top-bdii.cern.ch -p 2170 -b o=grid "(GlueCEUniqueID=*.ac.uk*)" GlueCEInfoHostName | grep GlueCEInfoHostName: | sort | uniq | cut -d: -f2 | |||
</pre> | |||
=== List of all sites that have a CE === | |||
<pre> | |||
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 | |||
</pre> | |||
=== List of CEs of a given site === | |||
Example for BEgrid-ULB-VUB : | |||
<pre> | |||
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 | |||
</pre> | </pre> |
Revision as of 13:00, 23 September 2016
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
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