Commit 2385dc7d authored by Alain Takoudjou's avatar Alain Takoudjou

slapos collect: do not divide cpu_load value by the number of cpu core

parent 807257f7
...@@ -191,14 +191,13 @@ class ConsumptionReport(object): ...@@ -191,14 +191,13 @@ class ConsumptionReport(object):
reference=self.computer_id, reference=self.computer_id,
category="") category="")
core_amount = psutil.cpu_count()
for user in self.user_list: for user in self.user_list:
partition_cpu_load_percent = self._getPartitionCPULoadAverage(user, date_scope) partition_cpu_load_percent = self._getPartitionCPULoadAverage(user, date_scope)
if partition_cpu_load_percent is not None: if partition_cpu_load_percent is not None:
journal.newMovement(transaction, journal.newMovement(transaction,
resource="service_module/cpu_load_percent", resource="service_module/cpu_load_percent",
title="CPU Load Percent Average for %s" % (user), title="CPU Load Percent Average for %s" % (user),
quantity=str(partition_cpu_load_percent/core_amount), quantity=str(partition_cpu_load_percent),
reference=user, reference=user,
category="") category="")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment