-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathcommands.txt
56 lines (38 loc) · 3.13 KB
/
commands.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
Disk Cleaning
1-2- get dataset with cust loc
awk '{system("python ~/scripts/phedex/checkReplica.py --option custodial:y --dataset "$1)}'
3- Exclude dataset used in an ongoing workflow
awk '{system("python ~/scripts/disk_cleaning/checkWFStat.py --inputdataset "$1)}' step2.out > step3.out
cat step3.out | egrep -v "assigned|assignment-approved|acquired|running" | cut -d ' ' -f 2 > 3ral.out
4-awk '{system("printf "$1"\" \" ;/afs/cern.ch/user/m/mtaze/scripts/phedex/datasvc.py --service data --options \"dataset="$1"\" --path /phedex/dbs/dataset/time_create")}' step3.out | tee step4.out
awk '{ if( ($2 < 1383824042) ) print $1 " " $2 }' 4.out | tee 4ral.out
awk '{system("python ~/scripts/disk_cleaning/checkWFStat.py --inputdataset "$1)}'
~/scripts/parallel.sh --command ' ?' --file [file] --output [output]
re-inject:
curl --cert $X509_USER_PROXY --key $X509_USER_PROXY -k -d "node=$2" -d "data=`cat $1`" https://cmsweb.cern.ch/phedex/datasvc/xml/prod/inject
Regular Checks
-noreplica
grep "/RAW$" dataset_without_replica.out
awk '{system("python /afs/cern.ch/user/m/mtaze/TransferTeam/commons/checkReplica.py --dataset "$1)}' dataset_without_replica.out | grep -v "sites: $"
awk '{system("~/dbs3-client/slc5_amd64_gcc461/cms/dbs3-client/3.1.8/examples/DBS3SetDatasetStatus.py --url=https://cmsweb.cern.ch/dbs/prod/global/DBSWriter --status=DELETED --recursive=False -d " $1 " || echo " $1)}' dataset_without_replica.out | tee no_replica_failed_files
LOADTEST invalidation
https://twiki.cern.ch/twiki/bin/view/CMS/PhedexOperationsLoadTestCreation#If_you_already_have_a_LoadTest07
1- get sourceloadtest dataset name
https://cmsweb.cern.ch/phedex/datasvc/xml/debug/blockreplicas?dataset=/PhEDEx_Debug/LoadTest07Source/*&node=T2_US_Caltech
invalidate it
FileDeleteTMDB -db ~/.globus/DBParam:Debug/Meric -list dataset:/PhEDEx_Debug/LoadTest07Source/Caltech -keepempty dataset -invalidate
2- get all dest loadtest datasets
/afs/cern.ch/user/m/mtaze/scripts/phedex/datasvc.py --instance=debug --service blockreplicas --options "dataset=/PhEDEx_Debug/LoadTest07_*/*" --path /phedex/block:name | cut -d '/' -f 3 | grep -i Caltech | sort | uniq
- invalidate
FileDeleteTMDB -db ~/.globus/DBParam:Debug/Meric -list dataset:/PhEDEx_Debug/LoadTest07_Caltech/%,dataset:/PhEDEx_Debug/LoadTest07_T2_US_Caltech/%,dataset:/PhEDEx_Debug/LoadTest07_US_Caltech/% -keepempty dataset -invalidate -bulk
4- create injection xml
~/phedex/PHEDEX-micro/Toolkit/LoadTest/LoadTestFileInfoToInjectXML loadtestinfo
file: "id,cksm,size"
5- open dataset
sqlplus $(~/phedex/PHEDEX-micro/Utilities/OracleConnectId -db ~/.globus/DBParam:Debug/Meric)
set role phedex_opsmeric_debug identified by XXXXXXXXXXXX;
update t_dps_dataset set is_open = 'y' where name = '/PhEDEx_Debug/LoadTest07Source/Caltech';
6- inject
~/phedex/PHEDEX-micro/Toolkit/Request/TMDBInject -verbose -version0 -db ~/.globus/DBParam:Debug/Meric -nodes T2_US_Caltech -filedata LoadTest07Source_US_Caltech.xml
* get dest loadtest files
/afs/cern.ch/user/m/mtaze/scripts/phedex/datasvc.py --instance=debug --service filereplicas --options "lfn=/store/PhEDEx_LoadTest07/LoadTest07_Debug_US_Va*/*/*/*US_Vandy_F8*" --path /phedex/block/file:name > vandy.out