[PATCH] usertools: enhance logic to display NUMA

Stephen Hemminger stephen at networkplumber.org
Tue Jul 11 17:42:06 CEST 2023


On Sat, 26 Mar 2022 00:32:07 -0700
Vipin Varghese <vipin.varghese at amd.com> wrote:

> +
> +  output = " Socket " + str(socket).ljust(3, ' ') + " Numa " + str(numa).zfill(1) + " "
> +  #output = " Socket " + str(socket).zfill(1) + " Numa " + str(numa).zfill(1) + " "
> +  print(output)
> +  print(format("-" * len(output)))
> +
> +  for index,coreSibling in enumerate(numa_map[keys]):
> +      print ("Core " + str(index).ljust(3, ' ') + "    " + str(coreSibling))
> +      #print ("Core " + str(index).zfill(3) + "    " + str(coreSibling))
> +print("")
> +
> -- 

Git complains because you added new blank line at end of file.

One wording suggestion would be to use the term "Node" instead of "Numa" in the table.
And fix heading alignment. The new headings don't look right.

For the case with only single socket, single node, some of the headings could be
dropped as well.

I.e:

Socket 0   Node 0 
-------------------
Core 0      [0, 4]
Core 1      [1, 5]
Core 2      [2, 6]
Core 3      [3, 7]


More information about the dev mailing list