-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Metricbeat: Use system-wide ticks to calculate docker cpu usage (#6608)
This implementation is more coherent with `docker stats` implementation. It is based in the ratio between the number of CPU ticks of the container and the number of ticks of the whole system during a fixed period of time. Previous implementation considered that the whole system had a cpu time of a second during each measurement, what is not always 100% accurate. New implementation also takes into account the number of CPUs, as other tools like `top` or `docker stats` do, so if a container is using 25% of CPU time of a 4 CPUs machine, the reported percentage will be 100%, with a maximum of 400% total usage if it is using all the CPU time. These changes can modify the resulting values of docker CPU metrics.
- Loading branch information
Showing
5 changed files
with
96 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters