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][linux] Fix #1037 only count logical cores where 2nd field is a number #1039

Merged
merged 1 commit into from Apr 13, 2021

Conversation

Lomanic
Copy link
Collaborator

@Lomanic Lomanic commented Feb 21, 2021

[cpu][linux] Fix #1037 only count logical cores where 2nd field is a number

@Lomanic
Copy link
Collaborator Author

Lomanic commented Feb 21, 2021

@blalor can you run go test -v github.com/shirou/gopsutil/cpu on the Android phone you found this issue? This is to check the TestCPUCountsAgainstLscpu test (lscpu should be on the phone, tested on Termux on mine).

If you can't, could you paste the result of LC_ALL=C lscpu as run on the phone?

@blalor
Copy link

blalor commented Mar 3, 2021

Thank you for the fix! Unfortunately lscpu is not on the devices I'm working with, which are running Fire OS.

@Lomanic
Copy link
Collaborator Author

Lomanic commented Apr 13, 2021

The MT8183 is described as an octa-core chip, and the mocked test finds 8 logical cores.

I feel OK merging that.

@Lomanic Lomanic merged commit d447f9f into shirou:master Apr 13, 2021
@Lomanic Lomanic deleted the issue1037 branch April 13, 2021 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cpu.Counts(true) double-counts processors
2 participants