Closed DevinCampbell closed 5 years ago
In the influxdb storage plugin, it sends "cpu_usage_total" as the value of stats.CPU.Usage.Total, which is in nanoseconds according to the v1 api
Ok, so stats.CPU.Usage.Total measures CPU usage by the amount of time in nanoseconds each container utilizes the CPU?
yeah, it is a cumulative metric, so it is the total number of nanosecond-cores a container has utilized since its creation.
I am attempting to set up a graph in Grafana showing total CPU usage by container over time. I currently have InfluxDB, cAdvisor, and Grafana all running in Docker containers. When I look in cAdvisor's web GUI the y-axis shows "Cores" but when I go into Grafana and choose the metric "cpu_usage_total" it is showing significantly larger numbers, so there must be something I'm not understanding here about how CPU usage is measured by cAdvisor. I have attempted to look in the documentation in google/cadvisor/docs but I'm not seeing an explanation for this.