1

There seems to be a bug with lscpu where it can not determine the correct number of sockets. There is an issue opened for this but I haven't got any response https://github.com/karelzak/util-linux/issues/698. This is my output:

Architecture:          ppc64le
Byte Order:            Little Endian
CPU(s):                256
On-line CPU(s) list:   0-255
Thread(s) per core:    8
Core(s) per socket:    1
Socket(s):             32
NUMA node(s):          5
Model:                 IBM,9119-MHE
L1d cache:             64K
L1i cache:             32K
NUMA node0 CPU(s):     0-255
NUMA node4 CPU(s):
NUMA node5 CPU(s):
NUMA node6 CPU(s):
NUMA node7 CPU(s):

Is there another way to go about getting the number of sockets?

TreeWater
  • 761
  • 6
  • 13
  • lscpu is reading from /proc, as mentioned in that thread on github. Read the relevant code for the kernel and find out how the kernel is doing it and why it is doing it that way. Probably you'll have to file a bug for the kernel (if you are using the latest version, it is a bug and hasn't been fixed yet) – hek2mgl Feb 25 '20 at 22:07
  • 1
    A [fix](https://github.com/linuxppc/linux/commit/94de3011f8d8b438d9a24f6829ba557c6f74e8d5) is probably on the way. – danblack Feb 26 '20 at 03:49
  • different patch in the answer below as I was corrected out of band. It even includes the lscpu info in the comment message showing the fix. – danblack Feb 26 '20 at 04:44

1 Answers1

2

A linux patch currently in testing (on Feb 26 2020) patch fixes this issue.

The patch is this one

Expect this to come out in the next 5.6 linux kernel release.

danblack
  • 12,130
  • 2
  • 22
  • 41