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

CPU usage is not correct when host have virtual machine #91

Open
jimmyxian opened this issue Jan 30, 2019 · 0 comments
Open

CPU usage is not correct when host have virtual machine #91

jimmyxian opened this issue Jan 30, 2019 · 0 comments

Comments

@jimmyxian
Copy link

When running Virtual Machine(KVM) in host, I find that the value of host cpu usage is different between falcon agent and top cmd. Actually, falcon agent use nux package to calculate cpu usage.
https://github.com/open-falcon-archive/agent/blob/master/funcs/cpustat.go#L19

In Linux Kernel, User time is already include Guest cpu time. So when read cpu info from /proc/stat, we should not add guest time once more.

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/kernel/sched/cputime.c#n138

Have already make a PR in nux. If merged, I think we need to update this agent.

toolkits/nux#18

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

No branches or pull requests

1 participant