Unfortunately it returns a value of 0 if the cores are not in use. PercpuUsage is an array containing the usage of all your CPU-cores. Michael Michael 8, 1 1 gold badge 28 28 silver badges 46 46 bronze badges. Any ideas? Isn't your value in the example above as percentage or am I getting something wrong? Active Oldest Votes. Mau me kitne tehsil haiĪsked 5 years, 2 months ago. You are just given the results in nanoseconds, not seconds, in the API. Docker provides an interactive stats command, docker stats which gives up to date information on the CPU usage, like so.īasically, you take a point of reference, then see the difference in say 10 secs, you can then tell how much of the time was used by the container. Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information. By using our site, you acknowledge that you have read and understand our Cookie PolicyPrivacy Policyand our Terms of Service.