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

[Windows] cpu.Info() timing out #469

Closed
FlorinAsavoaie opened this issue Dec 11, 2017 · 4 comments
Closed

[Windows] cpu.Info() timing out #469

FlorinAsavoaie opened this issue Dec 11, 2017 · 4 comments

Comments

@FlorinAsavoaie
Copy link

In github.com/shirou/gopsutil/internal/common, there is a Timeout hardcoded for the WMI queries. When the CPU is busy, cpu.Info() (and maybe other stuff as well) is failing as the WMI is taking too long to respond to the query. I would expect to be able to pass this Timeout from my code.

@FlorinAsavoaie FlorinAsavoaie changed the title cpu.Info() timing out [Windows] cpu.Info() timing out Dec 11, 2017
@vrecan
Copy link
Contributor

vrecan commented Dec 11, 2017

I've run into this a few times as well. It would be nice to be able to pass in the context timeouts or set them in some way.

@shirou shirou mentioned this issue Dec 19, 2017
9 tasks
@shirou
Copy link
Owner

shirou commented Dec 19, 2017

I have added plan to v3 (#362) about WithContext method.

@sadag
Copy link

sadag commented Feb 12, 2018

Please review PR #488

@Lomanic
Copy link
Collaborator

Lomanic commented Oct 23, 2022

Closing as a duplicate of #394 (as always, WMI calls should be avoided)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants