Skip to content

Commit

Permalink
made slight changes to usage_by_scope function
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicole Avila committed Aug 28, 2020
1 parent 46911f8 commit 3ff8937
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 29 deletions.
5 changes: 2 additions & 3 deletions container_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,18 +99,17 @@ def rucio_container_size_summary(target_container_list):
# Gives you the usage per scope.
#This function intentionally does not take inconsideration of duplicate datasets within a container.
def rucio_scope_size_summary():
sum_of_scopes = {}
usage_per_scope = []
all_rses = rseclient.list_rses()
for rse in all_rses:
sumof_datasets = {}
sum_of_scopes = {}
rse_datasets = replicaclient.list_datasets_per_rse(rse['rse'])
for dataset in rse_datasets:
try:
sum_of_scopes[dataset['scope']] += dataset['bytes']
except KeyError:
sum_of_scopes.update({dataset['scope']: dataset['bytes']})
print(sum_of_scopes)
print(sum_of_scopes, rse['rse'])
for key in sum_of_scopes:
mytoday = datetime.today()
usage_per_scope.append({'scope': key, 'country': rse['country_name'], 'rse': rse['rse'], 'usage': sum_of_scopes[key],'timestamp': mytoday.isoformat()})
Expand Down
26 changes: 0 additions & 26 deletions container_list.txt
Original file line number Diff line number Diff line change
@@ -1,27 +1 @@
protodune-sp:np04_raw_all_run_numbers
protodune-sp:raw_calibration_v0
protodune-sp:sample_runs_raw_v1
protodune-sp:sample_runs_raw_v2
protodune-sp:np04_raw_runs_1-3999
protodune-sp:np04_raw_runs_4000-5099
np04_reco_keepup:np04_full-reconstructed_v07_08_00_05_physics
np04_reco_keepup:np04_full-reconstructed_v07_08_00_05_cosmics
np04_pdspprod2_reco:np04_PDSPProd2_full-reconstructed_v08_27_01_online_good_runs_2GeV
np04_pdspprod2_reco:np04_PDSPProd2_full-reconstructed_v08_27_01_online_good_runs_7GeV
np04_pdspprod2_reco:np04_PDSPProd2_full-reconstructed_v08_27_01_online_good_runs_1GeV
np04_pdspprod2_reco:np04_PDSPProd2_full-reconstructed_v08_27_01_online_good_runs_0.3GeV
np04_pdspprod2_reco:np04_PDSPProd2_full-reconstructed_v08_27_01_online_good_runs_6GeV
np04_pdspprod2_reco:np04_PDSPProd2_full-reconstructed_v08_27_01_online_good_runs_3GeV
np04_pdspprod2_reco:np04_PDSPProd2_full-reconstructed_v08_27_01_online_good_runs_0.5GeV
np04_pdspprod2_mc:PDSPProd2_MC_7GeV_reco_sce_off
np04_pdspprod2_mc:PDSPProd2_MC_3GeV_reco_sce_off
np04_pdspprod2_mc:PDSPProd2_MC_1GeV_reco_sce_off
np04_pdspprod2_mc:PDSPProd2_MC_7GeV_reco_sce_datadriven
np04_pdspprod2_mc:PDSPProd2_MC_3GeV_reco_sce_datadriven
np04_pdspprod2_mc:PDSPProd2_MC_1GeV_reco_sce_datadriven
np04_pdspprod2_mc:PDSPProd2_MC_6GeV_reco_sce_datadriven
np04_pdspprod2_mc:PDSPProd2_MC_2GeV_reco_sce_datadriven
np04_pdspprod2_mc:PDSPProd2_MC_6GeV_reco_sce_off
np04_pdspprod2_mc:PDSPProd2_MC_2GeV_reco_sce_off
protodune-dp:np02_commissioning_cosmics_raw
protodune-dp:np02_commissioning_test_raw

0 comments on commit 3ff8937

Please sign in to comment.