Purdue CMS Tier-2 Center
Home » User Information » Tools and FAQ » DBS Client Guide

DBS Client Guide

User can access DBS in two ways now.

1. Web interface: CMS DAS

2. Command line client:

#Initialize environment for  CMSSW from release area
cd /cvmfs/cms.cern.ch/slc5_amd64_gcc462/cms/cmssw/CMSSW_6_0_1/src
eval `scramv1 runtime -sh`
#For getting help
das_client.py --help

Some example query to get the dataset names

#find  2010 Egamma AOD 
das_client.py --query="dataset=/EG/Run2010A*/AOD"

#find list of all files for a given dataset  
das_client.py --query=" file dataset=/EG/Run2010A-Apr21ReReco-v1/AOD" \
--limit=0


#find datasets containing events from run number 108741
das_client.py --query="dataset run=108741 | grep dataset.name" --limit=0

 

Some other example queries 
#find latest 10 files from Express Reco
das_client.py --query="file  \
dataset=/MuOnia/Run2011B-PromptReco-v1/AOD | \
grep file.name, file.creation_time | \
sort `echo file.creation_time | awk -F ',' '{print $1}' | \
sed -e 's/\[u//'`" --limit=0  | tail -n 10

#find for a given dataset the files of a given Run:Lumi
das_client.py --query="file \
dataset=/HT/Run2011B-v1/RAW run=176304 lumi=80"

#find lumi for a given file
das_client.py --query="lumi file=\
/store/data/Run2011B/SingleElectron/RECO/PromptReco-v1/000\
/175/832/105D5EB3-A4DB-E011-BD6B-BCAEC5329716.root"

CPU Utilization

Raw Storage Use