Hi everyone, I’m trying to make a graph with the CPU usage of each of my containers.
I have founded a StackOverflow question that is linked to my problem here but I don’t understand all of the answer.
So I think someone here could help me to do it.
According to the answer I made :
y = (metric.usage_in_kernelmode + metric.usage_in_usermode)/( metric.idle+ metric.usage_in_kernelmode + metric.usage_in_usermode)*100 but I don’t know what idle is and where to find it.
Then in the comments the guy say :
“total_usage” seems to be the computing time my application/container consumed. You get another property “precpu_stats”, which looks exactly the same like “cpu_stats”, but the metrics are from the previous tick. I can then calculate delta-total_usage and delta-system_usage and the final solution is percent = (delta-total_usage / delta-system_usage) * percpu_usage.length * 100.0
But I don’t know how to do the “delta”
And in my collection I have: