Found cpuload to 2 decimal places

This commit is contained in:
Joshua Boniface 2023-08-29 21:41:44 -04:00
parent 83d475bd15
commit ed087d83c2
1 changed files with 1 additions and 1 deletions

View File

@ -753,7 +753,7 @@ def node_keepalive(logger, config, zkhandler, this_node, monitoring_instance):
this_node.memtotal = int(psutil.virtual_memory().total / 1024 / 1024) this_node.memtotal = int(psutil.virtual_memory().total / 1024 / 1024)
this_node.memused = int(psutil.virtual_memory().used / 1024 / 1024) this_node.memused = int(psutil.virtual_memory().used / 1024 / 1024)
this_node.memfree = int(psutil.virtual_memory().free / 1024 / 1024) this_node.memfree = int(psutil.virtual_memory().free / 1024 / 1024)
this_node.cpuload = os.getloadavg()[0] this_node.cpuload = round(os.getloadavg()[0], 2)
# Join against running threads # Join against running threads
if config["enable_hypervisor"]: if config["enable_hypervisor"]: