Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix improper calculation of CPU percentages #2123

Merged
merged 1 commit into from
Dec 5, 2016
Merged

Fix improper calculation of CPU percentages #2123

merged 1 commit into from
Dec 5, 2016

Conversation

Foxlik
Copy link
Contributor

@Foxlik Foxlik commented Dec 3, 2016

Required for all PRs:

  • [✔] CHANGELOG.md updated (we recommend not updating this until the PR has been approved by a maintainer)
  • [✔] Sign CLA (if not already signed)
  • [✖] README.md updated (if adding a new plugin)

On linux, the user and nice cpu time counters include the respective guest and guest_nice counters. This results in improper calculation of percentages.

Please see:
https://github.com/torvalds/linux/blob/447976e/kernel/sched/cputime.c#L169
https://lists.linuxfoundation.org/pipermail/virtualization/2009-August/013459.html
giampaolo/psutil#940

On linux, the cpu timer counters of user and nice include the respective guest and guest_nice counters. This results in improper calculation of percentages.

Please see:
https://github.com/torvalds/linux/blob/447976e/kernel/sched/cputime.c#L169
https://lists.linuxfoundation.org/pipermail/virtualization/2009-August/013459.html
giampaolo/psutil#940
@sparrc sparrc added this to the 1.2.0 milestone Dec 5, 2016
@sparrc
Copy link
Contributor

sparrc commented Dec 5, 2016

looks good, thanks for the PR

@sparrc sparrc merged commit 5a3f2e6 into influxdata:master Dec 5, 2016
@Foxlik Foxlik deleted the patch-1 branch January 19, 2017 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants