Re: lscpu -p is a work of fiction

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 26, 2010 at 3:34 AM, Karel Zak <kzak@xxxxxxxxxx> wrote:

> it will generate ibm-x440.tar.gz. Please, send me this tarball.

I sent the tarball from a Nehalem box at work privately to Karel.  But
I'll reproduce the contents of my mail below:

This is from a Dell R710, 8-core Nehalem w/HT, running RHEL 5.5.  It
looks like all of the sysfs components required for lscpu to work are
there, but as you can see from the attached tarball, this output of
lscpu -p doesn't bear any resemblance to the actual topology of the
box:

[root@etc752754a sys-utils]# ./lscpu -p
# The following is the parsable format, which can be fed to other
# programs. Each different item in every column has an unique ID
# starting from zero.
# CPU,Core,Socket,Node,,L1d,L1i,L2,L3
0,0,0,0,,0,0,0,0
1,0,0,0,,0,0,0,0
2,1,0,0,,1,1,1,0
3,1,0,0,,1,1,1,0
4,2,0,0,,2,2,2,0
5,2,0,0,,2,2,2,0
6,3,0,0,,3,3,3,0
7,3,0,0,,3,3,3,0
8,4,1,1,,4,4,4,1
9,4,1,1,,4,4,4,1
10,5,1,1,,5,5,5,1
11,5,1,1,,5,5,5,1
12,6,1,1,,6,6,6,1
13,6,1,1,,6,6,6,1
14,7,1,1,,7,7,7,1
15,7,1,1,,7,7,7,1

[root@etc752754a sys-utils]# cd /sys/devices/system/node/node0/
[root@etc752754a node0]# ll
total 0
lrwxrwxrwx 1 root root    0 Apr 23 15:36 cpu0 ->
../../../../devices/system/cpu/cpu0
lrwxrwxrwx 1 root root    0 Apr 23 15:36 cpu10 ->
../../../../devices/system/cpu/cpu10
lrwxrwxrwx 1 root root    0 Apr 23 15:36 cpu12 ->
../../../../devices/system/cpu/cpu12
lrwxrwxrwx 1 root root    0 Apr 23 15:36 cpu14 ->
../../../../devices/system/cpu/cpu14
lrwxrwxrwx 1 root root    0 Apr 23 15:36 cpu2 ->
../../../../devices/system/cpu/cpu2
lrwxrwxrwx 1 root root    0 Apr 23 15:36 cpu4 ->
../../../../devices/system/cpu/cpu4
lrwxrwxrwx 1 root root    0 Apr 23 15:36 cpu6 ->
../../../../devices/system/cpu/cpu6
lrwxrwxrwx 1 root root    0 Apr 23 15:36 cpu8 ->
../../../../devices/system/cpu/cpu8

Interestingly, lstopo on this same box produces the correct results
(note the phys= items for the PU's to tell me which CPU's the OS sees
this as being):

[root@etc752754a utils]# ./lstopo
Machine (142GB)
  NUMANode #0 (phys=0 71GB) + Socket #0 + L3 #0 (8192KB)
    L2 #0 (256KB) + L1 #0 (32KB) + Core #0
      PU #0 (phys=0)
      PU #1 (phys=8)
    L2 #1 (256KB) + L1 #1 (32KB) + Core #1
      PU #2 (phys=2)
      PU #3 (phys=10)
    L2 #2 (256KB) + L1 #2 (32KB) + Core #2
      PU #4 (phys=4)
      PU #5 (phys=12)
    L2 #3 (256KB) + L1 #3 (32KB) + Core #3
      PU #6 (phys=6)
      PU #7 (phys=14)
  NUMANode #1 (phys=1 71GB) + Socket #1 + L3 #1 (8192KB)
    L2 #4 (256KB) + L1 #4 (32KB) + Core #4
      PU #8 (phys=1)
      PU #9 (phys=9)
    L2 #5 (256KB) + L1 #5 (32KB) + Core #5
      PU #10 (phys=3)
      PU #11 (phys=11)
    L2 #6 (256KB) + L1 #6 (32KB) + Core #6
      PU #12 (phys=5)
      PU #13 (phys=13)
    L2 #7 (256KB) + L1 #7 (32KB) + Core #7
      PU #14 (phys=7)
      PU #15 (phys=15)
[root@etc752754a utils]#

But since lstopo requires us to download and compile something else,
and lscpu will be on every box everywhere as part of util-linux-ng,
then we'd obviously prefer that lscpu worked correctly.
--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux