-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
restart needed for system.ncpus to update #5451
Comments
We should probably start using gopsutil for this, but they are currently getting cpu count in the same way. Can you describe what type of system you have that has changes to the cpu count, so we can make a good argument for the necessity of this code, and then I'll open an issue on gopsutil. |
We are running our monitored environments on CentOS virtual machines, ufortunately I do not have enough information about the underlying system configuration, but the parameters like te number of CPUs or RAM of individual VMs can be changed without the need to restart the VM. If you need more information, please give me a specific question and I will try to answer. |
Do you know what the hypervisor is? |
I will find out and send it to you, but the bug would reproduce on ANY hypervisor, because of the nature of the code for checking the number of CPUs. |
True, I'm just trying to make the use case a little more concrete with a specific example. I just looked up how to do this with kvm + libvirt and was able to do this in a test VM, so I think this will be a good enough example and also helpful for testing. |
Thanks a lot, I will give you specific information about the hypervisor when the rest of our team is awake :) |
Support for updating the number of CPUs dynamically has been added, though we only have Linux support for now. |
Thanks for the kind words, appreciated. Indeed you're right, gopsutil v2.19.7 includes support for both linux and darwin but only v2.19.8+ will include the windows implementation. |
This https://github.com/influxdata/telegraf/blob/master/plugins/inputs/system/system.go#L37 calls a GO system function https://golang.org/pkg/runtime/#NumCPU, which has undesired bahaviour. To force the system.ncpus metric to update in dashboard after change in OS, it is needed to restart telegraf process.
The text was updated successfully, but these errors were encountered: