next up previous contents
Next: Ldap Errors Up: Grid Information via ldap Previous: Grid Information via ldap   Contents

Query Examples


List Free CPUs:
ldapsearch \
-x \
-H ldap://lxshare0225.cern.ch:2170 \
-b 'mds-vo-name=local,o=grid' \
objectClass=ComputingElement \
CEId FreeCPUs -s sub > CPU.list



List CEs and SEs:
CE search
ldapsearch -LLL -x -H ldap://lxshare0225.cern.ch:2170 -b \
"mds-vo-name=local,o=grid" "(objectClass=ComputingElement)" dn \
> CE.list
ldapsearch -x -h ccedgli02.in2p3.fr -p 2170 -b \
"mds-vo-name=local,o=grid" "objectclass=ComputingElement" \
> LYON.CE.list
SE search
ldapsearch -LLL -x -H ldap://lxshare0225.cern.ch:2170 -b \
"mds-vo-name=local,o=grid" "(objectClass=StorageElement)" dn \
> SE.list



List CE Attributes and Authorized Users
ldapsearch \
-x \
-H ldap://lxshare0225.cern.ch:2170 \
-b 'mds-vo-name=local,o=grid' \
objectClass=ComputingElement > CEATTR.list



The above command searches attributes and authorized users. Attributes are parameters like MaxCPUTime, MinLocalDiskSpace, RunTimeEnvironment, AFSAvailable, etc. As output from most ldap queries may be very long, depending on how many items are registred, use redirection as shown in the examples.



List SE Attributes and get SEIds
ldapsearch \
-x \
-H ldap://lxshare0225.cern.ch:2170 \
-b 'mds-vo-name=local,o=grid' \
objectClass=StorageElement > SEATTR.list
grep SEId SEATTR.list > SE.ids



List SE and VO ids
ldapsearch \
-x \
-H ldap://lxshare0225.cern.ch:2170 \
-b 'mds-vo-name=local,o=grid' \
objectClass=StorageElement seid sevo > SEVO.list
#
grep -i se[iv][do] SEVO.list > SEVO.ids



List contacts
ldapsearch \
-LLL -x \
-H ldap://lxshare0225.cern.ch:2170 \
-b 'mds-vo-name=local,o=grid' \
objectClass=siteinfo SysadminContact > Contact.list
#
grep -i sysadmin Contact.list



List VO Replica Catalog
ldapsearch -H ldap://grid-vo.nikhef.nl:10489 -b \
"rc=AliceReplicaCatalog,dc=eu-datagrid,dc=org" -x \
> Nl.All.list



next up previous contents
Next: Ldap Errors Up: Grid Information via ldap Previous: Grid Information via ldap   Contents
luvisetto 2003-07-25