@@ -92,9 +92,9 @@ const (
9292 ElcTableName = "Efficiency Latency Control"
9393 MemoryTableName = "Memory"
9494 DIMMTableName = "DIMM"
95- NICTableName = "NIC"
96- NetworkIRQMappingTableName = "Network IRQ Mapping"
9795 NetworkConfigTableName = "Network Configuration"
96+ NICTableName = "NIC"
97+ NICCpuAffinityTableName = "NIC CPU Affinity"
9898 NICPacketSteeringTableName = "NIC Packet Steering"
9999 DiskTableName = "Disk"
100100 FilesystemTableName = "Filesystem"
@@ -367,35 +367,36 @@ var tableDefinitions = map[string]TableDefinition{
367367 FieldsFunc : dimmTableValues ,
368368 InsightsFunc : dimmTableInsights ,
369369 HTMLTableRendererFunc : dimmTableHTMLRenderer },
370- NICTableName : {
371- Name : NICTableName ,
372- HasRows : true ,
370+ NetworkConfigTableName : {
371+ Name : NetworkConfigTableName ,
372+ HasRows : false ,
373373 MenuLabel : NetworkMenuLabel ,
374+ ScriptNames : []string {
375+ script .SysctlScriptName ,
376+ script .IRQBalanceScriptName ,
377+ },
378+ FieldsFunc : networkConfigTableValues },
379+ NICTableName : {
380+ Name : NICTableName ,
381+ HasRows : true ,
374382 ScriptNames : []string {
375383 script .NicInfoScriptName ,
376384 },
377385 FieldsFunc : nicTableValues },
378- NetworkConfigTableName : {
379- Name : NetworkConfigTableName ,
380- HasRows : false ,
386+ NICCpuAffinityTableName : {
387+ Name : NICCpuAffinityTableName ,
388+ HasRows : true ,
381389 ScriptNames : []string {
382- script .SysctlScriptName ,
390+ script .NicInfoScriptName ,
383391 },
384- FieldsFunc : networkConfigTableValues },
392+ FieldsFunc : nicCpuAffinityTableValues },
385393 NICPacketSteeringTableName : {
386394 Name : NICPacketSteeringTableName ,
387395 HasRows : true ,
388396 ScriptNames : []string {
389397 script .NicInfoScriptName ,
390398 },
391399 FieldsFunc : nicPacketSteeringTableValues },
392- NetworkIRQMappingTableName : {
393- Name : NetworkIRQMappingTableName ,
394- HasRows : true ,
395- ScriptNames : []string {
396- script .NicInfoScriptName ,
397- },
398- FieldsFunc : networkIRQMappingTableValues },
399400 DiskTableName : {
400401 Name : DiskTableName ,
401402 HasRows : true ,
@@ -1637,7 +1638,6 @@ func nicTableValues(outputs map[string]script.ScriptOutput) []Field {
16371638 {Name : "MTU" , Description : "Maximum Transmission Unit. The largest size packet or frame, specified in octets (eight-bit bytes), that can be sent in a packet- or frame-based network such as the Internet." },
16381639 {Name : "TX Queues" },
16391640 {Name : "RX Queues" },
1640- {Name : "IRQBalance" , Description : "System level setting. Dynamically monitors system activity and spreads IRQs across available cores, aiming to balance CPU load, improve throughput, and reduce latency for interrupt-heavy workloads." },
16411641 {Name : "Adaptive RX" , Description : "Enables dynamic adjustment of receive interrupt coalescing based on traffic patterns." },
16421642 {Name : "Adaptive TX" , Description : "Enables dynamic adjustment of transmit interrupt coalescing based on traffic patterns." },
16431643 {Name : "rx-usecs" , Description : "Sets the delay, in microseconds, before an interrupt is generated after receiving a packet. Higher values reduce CPU usage (by batching packets), but increase latency. Lower values reduce latency, but increase interrupt rate and CPU load." },
@@ -1675,11 +1675,10 @@ func nicTableValues(outputs map[string]script.ScriptOutput) []Field {
16751675 fields [12 ].Values = append (fields [12 ].Values , nicInfo .MTU )
16761676 fields [13 ].Values = append (fields [13 ].Values , nicInfo .TXQueues )
16771677 fields [14 ].Values = append (fields [14 ].Values , nicInfo .RXQueues )
1678- fields [15 ].Values = append (fields [15 ].Values , nicInfo .IRQBalance )
1679- fields [16 ].Values = append (fields [16 ].Values , nicInfo .AdaptiveRX )
1680- fields [17 ].Values = append (fields [17 ].Values , nicInfo .AdaptiveTX )
1681- fields [18 ].Values = append (fields [18 ].Values , nicInfo .RxUsecs )
1682- fields [19 ].Values = append (fields [19 ].Values , nicInfo .TxUsecs )
1678+ fields [15 ].Values = append (fields [15 ].Values , nicInfo .AdaptiveRX )
1679+ fields [16 ].Values = append (fields [16 ].Values , nicInfo .AdaptiveTX )
1680+ fields [17 ].Values = append (fields [17 ].Values , nicInfo .RxUsecs )
1681+ fields [18 ].Values = append (fields [18 ].Values , nicInfo .TxUsecs )
16831682 }
16841683 return fields
16851684}
@@ -1700,14 +1699,14 @@ func nicPacketSteeringTableValues(outputs map[string]script.ScriptOutput) []Fiel
17001699 // XPS row
17011700 if nicInfo .TXQueues != "0" {
17021701 fields [0 ].Values = append (fields [0 ].Values , nicInfo .Name )
1703- fields [1 ].Values = append (fields [1 ].Values , "xps_cpus " )
1702+ fields [1 ].Values = append (fields [1 ].Values , "XPS " )
17041703 fields [2 ].Values = append (fields [2 ].Values , formatQueueCPUMappings (nicInfo .XPSCPUs , "tx-" ))
17051704 }
17061705
17071706 // RPS row
17081707 if nicInfo .RXQueues != "0" {
17091708 fields [0 ].Values = append (fields [0 ].Values , nicInfo .Name )
1710- fields [1 ].Values = append (fields [1 ].Values , "rps_cpus " )
1709+ fields [1 ].Values = append (fields [1 ].Values , "RPS " )
17111710 fields [2 ].Values = append (fields [2 ].Values , formatQueueCPUMappings (nicInfo .RPSCPUs , "rx-" ))
17121711 }
17131712 }
@@ -1746,7 +1745,7 @@ func formatQueueCPUMappings(mappings map[string]string, prefix string) string {
17461745 return strings .Join (queueMappings , " | " )
17471746}
17481747
1749- func networkIRQMappingTableValues (outputs map [string ]script.ScriptOutput ) []Field {
1748+ func nicCpuAffinityTableValues (outputs map [string ]script.ScriptOutput ) []Field {
17501749 nicIRQMappings := nicIRQMappingsFromOutput (outputs )
17511750 if len (nicIRQMappings ) == 0 {
17521751 return []Field {}
@@ -1772,6 +1771,7 @@ func networkConfigTableValues(outputs map[string]script.ScriptOutput) []Field {
17721771 {Name : "net.core.netdev_max_backlog" },
17731772 {Name : "net.ipv4.tcp_max_syn_backlog" },
17741773 {Name : "net.core.somaxconn" },
1774+ {Name : "IRQ Balance" },
17751775 }
17761776 // load the params into a map so we can easily look them up
17771777 sysctlParams := make (map [string ]string )
@@ -1788,13 +1788,14 @@ func networkConfigTableValues(outputs map[string]script.ScriptOutput) []Field {
17881788 }
17891789 }
17901790 // add the values to the fields
1791- for i := range fields {
1791+ for i := range fields [: 7 ] {
17921792 if val , ok := sysctlParams [fields [i ].Name ]; ok {
17931793 fields [i ].Values = append (fields [i ].Values , val )
17941794 } else {
17951795 fields [i ].Values = append (fields [i ].Values , "" )
17961796 }
17971797 }
1798+ fields [7 ].Values = append (fields [7 ].Values , strings .TrimSpace (outputs [script .IRQBalanceScriptName ].Stdout ))
17981799 return fields
17991800}
18001801
0 commit comments