[receiver/hostmetricsreceiver] Gopsutil error on windows with multiple processor groups. #33339
Labels
bug
Something isn't working
needs triage
New item requiring triage
processor/resourcedetection
Resource detection processor
Component(s)
receiver/hostmetricsreceiver
What happened?
Description
On a windows instance having 48 * 2 logical cpus, windows groups CPUs into batches of 64 logical cpus in a processor group, but Gopsutil's Cpu.TimesWitContext defined on the cpuscraper in here and used to by the resource detector to calculate the cpu times and utilization, indistinctly gets this data from one of the two processor groups and not all of them.
This is generating variable cpu Utilization, sometimes negative and sometimes full usage even if only half the cores are running.
This bug is reported on the gopsutil library.
Steps to Reproduce
In our case we reproduced it on a 'm5n.metal' machine in AWS with windows-server-22 but we know reports of it happening in other windows with more than one processor groups.
Expected Result
Correct Cpu Usage and times.
Actual Result
Cpu data points from one of the 2 processor groups randomly.
Collector version
v0.101.0
Environment information
Environment
OS: Windows-server 22
OpenTelemetry Collector configuration
Log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: