File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -273,7 +273,7 @@ def cores_per_socket(self):
273273
274274 def get_number_of_sockets (self ) -> int :
275275 """Get number of sockets in platform."""
276- cmd = "lscpu | grep 'Socket(s) ' | cut -d ':' -f 2 "
276+ cmd = "cat /proc/cpuinfo | grep 'physical id ' | sort -u | wc -l "
277277 if psutil .WINDOWS :
278278 cmd = r'wmic cpu get DeviceID | C:\Windows\System32\find.exe /C "CPU"'
279279
@@ -915,7 +915,7 @@ def dump_table_to_csv(
915915
916916def get_number_of_sockets () -> int :
917917 """Get number of sockets in platform."""
918- cmd = "lscpu | grep 'Socket(s) ' | cut -d ':' -f 2 "
918+ cmd = "cat /proc/cpuinfo | grep 'physical id ' | sort -u | wc -l "
919919 if sys .platform == "win32" :
920920 cmd = 'wmic cpu get DeviceID | find /c "CPU"'
921921
You can’t perform that action at this time.
0 commit comments