@@ -34,15 +34,15 @@ import (
3434 * nicSummaryTable() - has info derived from the full table, but is presented in summary format
3535 */
3636
37- func newMarketingClaimTable (fullReport * Report , tableNicSummary * Table , tableDiskSummary * Table , tableAcceleratorSummary * Table , category TableCategory ) (table * Table ) {
37+ func newMarketingClaimTable (fullReport * Report , tableNicSummary * Table , tableDiskSummary * Table , category TableCategory ) (table * Table ) {
3838 table = & Table {
3939 Name : "Marketing Claim" ,
4040 Category : category ,
4141 AllHostValues : []HostValues {},
4242 }
43- // BASELINE: 1-node, 2x Intel® Xeon® <SKU, processor>, xx cores, 100W TDP, HT On/Off?, Turbo On/Off?, NUMA xxx, Integrated Accelerators Available [used]: xxx, Total Memory xxx GB (xx slots/ xx GB/ xxxx MHz [run @ xxxx MHz] ), <BIOS version>, <ucode version>, <OS Version>, <kernel version>. Software: WORKLOAD+VERSION, COMPILER, LIBRARIES, OTHER_SW . Test by Intel as of <mm/dd/yy>.
44- template := "1-node, %sx %s, %s cores, %s TDP, HT %s, Turbo %s, NUMA %s, Integrated Accelerators Available [used]: %s, Total Memory %s, BIOS %s, microcode %s, %s, %s, %s, %s. Software: WORKLOAD+VERSION, COMPILER, LIBRARIES, OTHER_SW . Test by Intel as of %s."
45- var date , socketCount , cpuModel , coreCount , tdp , htOnOff , turboOnOff , numaNodes , installedMem , biosVersion , uCodeVersion , nics , disks , operatingSystem , kernelVersion string
43+ // BASELINE: 1-node, 2x Intel® Xeon® <SKU, processor>, xx cores, 100W TDP, HT On/Off?, Turbo On/Off?, Total Memory xxx GB (xx slots/ xx GB/ xxxx MHz [run @ xxxx MHz] ), <BIOS version>, <ucode version>, <OS Version>, <kernel version>. Test by Intel as of <mm/dd/yy>.
44+ template := "1-node, %sx %s, %s cores, %s TDP, HT %s, Turbo %s, Total Memory %s, BIOS %s, microcode %s, %s, %s, %s, %s. Test by Intel as of %s."
45+ var date , socketCount , cpuModel , coreCount , tdp , htOnOff , turboOnOff , installedMem , biosVersion , uCodeVersion , nics , disks , operatingSystem , kernelVersion string
4646
4747 for sourceIdx , source := range fullReport .Sources {
4848 var hostValues = HostValues {
@@ -78,16 +78,14 @@ func newMarketingClaimTable(fullReport *Report, tableNicSummary *Table, tableDis
7878 } else {
7979 turboOnOff = "?"
8080 }
81- numaNodes , _ = fullReport .findTable ("CPU" ).getValue (sourceIdx , "NUMA Nodes" )
82- accelerators , _ := tableAcceleratorSummary .getValue (sourceIdx , "Accelerators Available [used]" )
8381 installedMem , _ = fullReport .findTable ("Memory" ).getValue (sourceIdx , "Installed Memory" )
8482 biosVersion , _ = fullReport .findTable ("BIOS" ).getValue (sourceIdx , "Version" )
8583 uCodeVersion , _ = fullReport .findTable ("Operating System" ).getValue (sourceIdx , "Microcode" )
8684 nics , _ = tableNicSummary .getValue (sourceIdx , "NIC" )
8785 disks , _ = tableDiskSummary .getValue (sourceIdx , "Disk" )
8886 operatingSystem , _ = fullReport .findTable ("Operating System" ).getValue (sourceIdx , "OS" )
8987 kernelVersion , _ = fullReport .findTable ("Operating System" ).getValue (sourceIdx , "Kernel" )
90- claim := fmt .Sprintf (template , socketCount , cpuModel , coreCount , tdp , htOnOff , turboOnOff , numaNodes , accelerators , installedMem , biosVersion , uCodeVersion , nics , disks , operatingSystem , kernelVersion , date )
88+ claim := fmt .Sprintf (template , socketCount , cpuModel , coreCount , tdp , htOnOff , turboOnOff , installedMem , biosVersion , uCodeVersion , nics , disks , operatingSystem , kernelVersion , date )
9189 hostValues .Values = append (hostValues .Values , []string {claim })
9290 table .AllHostValues = append (table .AllHostValues , hostValues )
9391 }
@@ -1131,6 +1129,133 @@ func newGPUTable(sources []*Source, category TableCategory) (table *Table) {
11311129 return
11321130}
11331131
1132+ type Gaudi struct {
1133+ ModuleID string
1134+ SerialNumber string
1135+ BusID string
1136+ DriverVersion string
1137+ EROM string
1138+ CPLD string
1139+ SPI string
1140+ NUMA string
1141+ }
1142+
1143+ func newGaudiTable (sources []* Source , category TableCategory ) (table * Table ) {
1144+ table = & Table {
1145+ Name : "Gaudi" ,
1146+ Category : category ,
1147+ AllHostValues : []HostValues {},
1148+ }
1149+ for _ , source := range sources {
1150+ gaudis := []Gaudi {}
1151+ for i , line := range source .getCommandOutputLines ("gaudi info" ) {
1152+ if line == "" || i == 0 { // skip blank lines and header
1153+ continue
1154+ }
1155+ fields := strings .Split (line , ", " )
1156+ if len (fields ) != 4 {
1157+ log .Printf ("unexpected number of fields in gaudi info output" )
1158+ continue
1159+ }
1160+ gaudis = append (gaudis , Gaudi {ModuleID : fields [0 ], SerialNumber : fields [1 ], BusID : fields [2 ], DriverVersion : fields [3 ]})
1161+ }
1162+ // sort the gaudis by module ID
1163+ sort .Slice (gaudis , func (i , j int ) bool {
1164+ return gaudis [i ].ModuleID < gaudis [j ].ModuleID
1165+ })
1166+ // get NUMA affinity
1167+ numaAffinities := source .valsArrayFromRegexSubmatch ("gaudi numa" , `^(\d+)\s+(\d+)$` )
1168+ if len (numaAffinities ) != len (gaudis ) {
1169+ log .Printf ("number of gaudis in gaudi info and numa output do not match" )
1170+ return nil
1171+ }
1172+ for i , numaAffinity := range numaAffinities {
1173+ gaudis [i ].NUMA = numaAffinity [1 ]
1174+ }
1175+ // get firmware versions
1176+ reDevice := regexp .MustCompile (`^\[(\d+)] AIP \(accel\d+\) (.*)$` )
1177+ reErom := regexp .MustCompile (`^erom$` )
1178+ reCpld := regexp .MustCompile (`^cpld$` )
1179+ rePreboot := regexp .MustCompile (`^preboot$` )
1180+ reComponent := regexp .MustCompile (`^component\s+:\s+hl-gaudi\d-(.*)-sec-\d+` )
1181+ reCpldComponent := regexp .MustCompile (`^component\s+:\s+(0x[0-9a-fA-F]+\.[0-9a-fA-F]+)$` )
1182+ deviceIdx := - 1
1183+ state := - 1
1184+ for _ , line := range source .getCommandOutputLines ("gaudi firmware" ) {
1185+ if line == "" {
1186+ continue
1187+ }
1188+ match := reDevice .FindStringSubmatch (line )
1189+ if match != nil {
1190+ var err error
1191+ deviceIdx , err = strconv .Atoi (match [1 ])
1192+ if err != nil {
1193+ log .Printf ("failed to parse device index" )
1194+ return nil
1195+ }
1196+ if deviceIdx >= len (gaudis ) {
1197+ log .Printf ("device index out of range" )
1198+ return nil
1199+ }
1200+ continue
1201+ }
1202+ if deviceIdx == - 1 {
1203+ continue
1204+ }
1205+ if reErom .FindString (line ) != "" {
1206+ state = 0
1207+ continue
1208+ }
1209+ if reCpld .FindString (line ) != "" {
1210+ state = 1
1211+ continue
1212+ }
1213+ if rePreboot .FindString (line ) != "" {
1214+ state = 2
1215+ continue
1216+ }
1217+ if state != - 1 {
1218+ switch state {
1219+ case 0 :
1220+ match := reComponent .FindStringSubmatch (line )
1221+ if match != nil {
1222+ gaudis [deviceIdx ].EROM = match [1 ]
1223+ }
1224+ case 1 :
1225+ match := reCpldComponent .FindStringSubmatch (line )
1226+ if match != nil {
1227+ gaudis [deviceIdx ].CPLD = match [1 ]
1228+ }
1229+ case 2 :
1230+ match := reComponent .FindStringSubmatch (line )
1231+ if match != nil {
1232+ gaudis [deviceIdx ].SPI = match [1 ]
1233+ }
1234+ }
1235+ state = - 1
1236+ }
1237+ }
1238+ var hostValues = HostValues {
1239+ Name : source .getHostname (),
1240+ ValueNames : []string {
1241+ "Module ID" ,
1242+ "Serial Number" ,
1243+ "Bus ID" ,
1244+ "Driver Version" ,
1245+ "EROM" ,
1246+ "CPLD" ,
1247+ "SPI" ,
1248+ "NUMA Node" ,
1249+ },
1250+ }
1251+ for _ , gaudi := range gaudis {
1252+ hostValues .Values = append (hostValues .Values , []string {gaudi .ModuleID , gaudi .SerialNumber , gaudi .BusID , gaudi .DriverVersion , gaudi .EROM , gaudi .CPLD , gaudi .SPI , gaudi .NUMA })
1253+ }
1254+ table .AllHostValues = append (table .AllHostValues , hostValues )
1255+ }
1256+ return
1257+ }
1258+
11341259func newNICTable (sources []* Source , category TableCategory ) (table * Table ) {
11351260 table = & Table {
11361261 Name : "NIC" ,
@@ -1140,7 +1265,7 @@ func newNICTable(sources []*Source, category TableCategory) (table *Table) {
11401265 idxNicName := 0
11411266 idxNicModel := 1
11421267 for _ , source := range sources {
1143- nicsInfo := source .valsArrayFromRegexSubmatch ("lshw" , `^pci.*? (\S+)\s+network\s+(\S.*?) \s+\[\w+:\w+] $` )
1268+ nicsInfo := source .valsArrayFromRegexSubmatch ("lshw" , `^\S+\s+ (\S+)\s+network\s+([^\[]+?)(?: \s+\[.*\])? $` )
11441269 nicsInfo = append (nicsInfo , source .valsArrayFromRegexSubmatch ("lshw" , `^usb.*? (\S+)\s+network\s+(\S.*?)$` )... )
11451270 var nics [][]string
11461271 for _ , nic := range nicsInfo {
0 commit comments