Commit 26d3d9a3 authored by Azat Khuziyakhmetov's avatar Azat Khuziyakhmetov
Browse files

cpu usage percentage for nodes calculated as 100 - cpu_usage_idle

parent 10a2fd32
......@@ -74,7 +74,9 @@ def get_aggregator(job_id, type="ascii"):
if type == "pdf":
new_node.proc.seq_cpu_usage = SeqVals(data["seq_delta"], data["seq"][node_id]["proc_cpu_usage_sum"])
new_node.proc.seq_mem_rss_sum = SeqVals(data["seq_delta"], data["seq"][node_id]["proc_mem_rss_sum"])
new_node.seq_cpu_usage = SeqVals(data["seq_delta"], data["seq"][node_id]["node_cpu_usage_avg"])
new_node.seq_cpu_usage = SeqVals(data["seq_delta"], data["seq"][node_id]["node_cpu_idle_avg"])
new_node.seq_cpu_usage.seq = [None if x is None else (100 - x) for x in new_node.seq_cpu_usage.seq]
new_node.seq_load = SeqVals(data["seq_delta"], data["seq"][node_id]["node_load_avg"])
aggr.nodes.append(new_node)
......
......@@ -148,6 +148,12 @@ metrics_seq = {
"query": QType.AVG_OF_NODE,
"measurement": conf.measurements["cpu"],
},
"node_cpu_idle_avg": {
"dbname": "usage_idle",
"type": MType.FLT,
"query": QType.AVG_OF_NODE,
"measurement": conf.measurements["cpu"],
},
"node_load_avg": {
"dbname": "load1",
"type": MType.FLT,
......
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