aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Common/derived.py5
-rw-r--r--ticker.py3
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)
diff --git a/ticker.py b/ticker.py
index 3cc34ec..12e4456 100644
--- a/ticker.py
+++ b/ticker.py
@@ -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