diff options
author | Volker Hoffmann <volker@cheleb.net> | 2015-08-26 09:08:11 +0200 |
---|---|---|
committer | Volker Hoffmann <volker@cheleb.net> | 2015-08-26 09:08:11 +0200 |
commit | 68d53ef05ffd5084c1621b53f178fadf0c07e346 (patch) | |
tree | 883bbd3f1d0856ecdb35bf6d9ac18b73c5bb7710 | |
parent | e4f7fcd1c53bbfc1e507eb34213fd6ac0dd6f752 (diff) |
fix: compute cpu utilization with allocated cpu cores instead of partitions
-rw-r--r-- | Common/derived.py | 5 | ||||
-rw-r--r-- | ticker.py | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/Common/derived.py b/Common/derived.py index fae3da5..eb29a14 100644 --- a/Common/derived.py +++ b/Common/derived.py @@ -4,7 +4,8 @@ Derived Quantities. def compute_utilization(number_of_nodes_down, \ - number_of_jobs_by_partition): + number_of_jobs_by_partition, \ + number_of_allocated_cpus): """ Compute Cluster Utilization. @@ -21,7 +22,7 @@ def compute_utilization(number_of_nodes_down, \ # 2 Sockets per Server, 8 Cores per Socket, 192 Servers = 3072 Cores total_cpu_cores = 16*192 cpu_nodes_down = number_of_nodes_down['cpu']*16 - allocated_cpu_cores = number_of_jobs_by_partition['cpu']['running'] + allocated_cpu_cores = number_of_allocated_cpus['cpu'] utilization['cpu'] = \ float(allocated_cpu_cores) / float(total_cpu_cores - cpu_nodes_down) @@ -28,7 +28,8 @@ njobs_by_partition_and_state = \ # ############################################################################# utilization_by_partition = \ derived.compute_utilization(number_of_nodes_down, \ - njobs_by_partition_and_state) + njobs_by_partition_and_state, \ + cpu_allocations) # ############################################################################# # Load Data from Netatmo |