cd /opt/ppd/cms/phedex
. PHEDEX/etc/profile.d/init.sh
PHEDEX/Utilities/BlockDownloadVerify-injector.pl --node T2_UK_SGrid_RALPP --block '%' --dbconfig /opt/ppd/cms/phedex/Prod_T2_UK_SGrid_RALPP/Prod/T2UKSGRIDRALPP --test size
PHEDEX/Utilities/BlockDownloadVerify-report.pl --db /opt/ppd/cms/phedex/Prod_T2_UK_SGrid_RALPP/DBParam:Prod/T2UKSGRIDRALPP --node T2_UK_SGrid_RALPP --detail --days 7 > Prod_T2_UK_SGrid_RALPP/ConsistencyCheck/DownloadVerify-$(date +%Y-%m-%d)-report.txt
grep Fail Prod_T2_UK_SGrid_RALPP/ConsistencyCheck/DownloadVerify-$(date +%Y-%m-%d)-report.txt | grep LFN= | cut -d ' ' -f 3 | sort
cd /pnfs/pp.rl.ac.uk/data/cms/store/
find mc data generator results hidata himc lumi relval -type f -mtime +30 -print > /opt/ppd/cms/phedex/Prod_T2_UK_SGrid_RALPP/ConsistencyCheck/file_list-$(date +%Y-%m-%d).txt
sed -i -e 's|^\(.*\)|/store/\1|' Prod_T2_UK_SGrid_RALPP/ConsistencyCheck/file_list-$(date +%Y-%m-%d).txt
PHEDEX/Utilities/StorageConsistencyCheck --db /opt/ppd/cms/phedex/Prod_T2_UK_SGrid_RALPP/DBParam:Prod/T2UKSGRIDRALPP -se_name heplnx204.pp.rl.ac.uk -lfnlist Prod_T2_UK_SGrid_RALPP/ConsistencyCheck/file_list-$(date +%Y-%m-%d).txt | tee Prod_T2_UK_SGrid_RALPP/ConsistencyCheck/StorageConsistencyCheck-$(date +%Y-%m-%d).out