py-cpuinfo icon indicating copy to clipboard operation
py-cpuinfo copied to clipboard

Add socket count

Open benjaminlebigot opened this issue 2 years ago • 1 comments

Hi,

Thanks for your work, we are using your library to retrieve hardware information which we use to estimate environmental impact of pools of servers. Your work has saved us a lot of time, thanks again.

Adding the socket count retrieved from /proc/cpuinfo.

A patch was needed on the functions: _get_field(), _get_field_actual() in order to retrieve the max value of a given field.

Tests have been adapted and are all passing.

Don't hesitate to contact me for any further information or adaptation.

benjaminlebigot avatar Jun 06 '22 22:06 benjaminlebigot

I'm trying to make py-cpuinfo work consistently on every platform (Linux/Windows/OSX/BeOS/Haiku/Solaris). This looks to only gets socket count on Linux. If I add the ability to get socket count, it needs to work consistently on every platform. Plus it looks like it uses curses, which I don't think works on every platform.

workhorsy avatar Sep 04 '22 00:09 workhorsy