[bugfix] Use only onlines CPUs in lscpu (#40161)

Signed-off-by: kse <kevin.sejourne@cloud-temple.com>
Co-authored-by: kse <kevin.sejourne@cloud-temple.com>
This commit is contained in:
Galigator
2026-04-20 13:19:57 +00:00
committed by GitHub
co-authored by kse
parent b82fc1364d
commit a023edfa5b
+1 -1
View File
@@ -155,7 +155,7 @@ def _get_cpu_list() -> list[LogicalCPUInfo]:
return [LogicalCPUInfo(i, i, 0) for i in range(cpu_count)]
lscpu_output = subprocess.check_output(
"lscpu -J -e=CPU,CORE,NODE", shell=True, text=True
"lscpu --json --extended=CPU,CORE,NODE --online", shell=True, text=True
)
# For platform without NUMA, replace '-' to '0'