@@ -522,6 +522,27 @@ func channelsFromOutput(outputs map[string]script.ScriptOutput) string {
522
522
return fmt .Sprintf ("%d" , cpu .MemoryChannelCount )
523
523
}
524
524
525
+ func turboEnabledFromOutput (outputs map [string ]script.ScriptOutput ) string {
526
+ vendor := valFromRegexSubmatch (outputs [script .LscpuScriptName ].Stdout , `^Vendor ID:\s*(.+)$` )
527
+ switch vendor {
528
+ case "GenuineIntel" :
529
+ val := valFromRegexSubmatch (outputs [script .CpuidScriptName ].Stdout , `^Intel Turbo Boost Technology\s*= (.+?)$` )
530
+ if val == "true" {
531
+ return "Enabled"
532
+ }
533
+ if val == "false" {
534
+ return "Disabled"
535
+ }
536
+ return "" // unknown value
537
+ case "AuthenticAMD" :
538
+ val := valFromRegexSubmatch (outputs [script .LscpuScriptName ].Stdout , `^Frequency boost.*:\s*(.+?)$` )
539
+ if val != "" {
540
+ return val + " (AMD Frequency Boost)"
541
+ }
542
+ }
543
+ return ""
544
+ }
545
+
525
546
func isPrefetcherEnabled (msrValue string , bit int ) (bool , error ) {
526
547
if msrValue == "" {
527
548
return false , fmt .Errorf ("msrValue is empty" )
@@ -1813,9 +1834,9 @@ func cveSummaryFromOutput(outputs map[string]script.ScriptOutput) string {
1813
1834
}
1814
1835
1815
1836
func systemSummaryFromOutput (outputs map [string ]script.ScriptOutput ) string {
1816
- // BASELINE: 1-node, 2x Intel® Xeon® <SKU, processor>, xx cores, 100W TDP, HT 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>.
1817
- template := "1-node, %sx %s, %s cores, %s TDP, HT %s, Total Memory %s, BIOS %s, microcode %s, %s, %s, %s, %s. Test by Intel as of %s."
1818
- var socketCount , cpuModel , coreCount , tdp , htOnOff , installedMem , biosVersion , uCodeVersion , nics , disks , operatingSystem , kernelVersion , date string
1837
+ // 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>.
1838
+ 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."
1839
+ var socketCount , cpuModel , coreCount , tdp , htOnOff , turboOnOff , installedMem , biosVersion , uCodeVersion , nics , disks , operatingSystem , kernelVersion , date string
1819
1840
1820
1841
// socket count
1821
1842
socketCount = valFromRegexSubmatch (outputs [script .LscpuScriptName ].Stdout , `^Socket\(s\):\s*(\d+)$` )
@@ -1840,6 +1861,15 @@ func systemSummaryFromOutput(outputs map[string]script.ScriptOutput) string {
1840
1861
default :
1841
1862
htOnOff = "?"
1842
1863
}
1864
+ // turbo
1865
+ turboOnOff = turboEnabledFromOutput (outputs )
1866
+ if strings .Contains (strings .ToLower (turboOnOff ), "enabled" ) {
1867
+ turboOnOff = "On"
1868
+ } else if strings .Contains (strings .ToLower (turboOnOff ), "disabled" ) {
1869
+ turboOnOff = "Off"
1870
+ } else {
1871
+ turboOnOff = "?"
1872
+ }
1843
1873
// memory
1844
1874
installedMem = installedMemoryFromOutput (outputs )
1845
1875
// BIOS
@@ -1857,7 +1887,7 @@ func systemSummaryFromOutput(outputs map[string]script.ScriptOutput) string {
1857
1887
// date
1858
1888
date = strings .TrimSpace (outputs [script .DateScriptName ].Stdout )
1859
1889
// put it all together
1860
- return fmt .Sprintf (template , socketCount , cpuModel , coreCount , tdp , htOnOff , installedMem , biosVersion , uCodeVersion , nics , disks , operatingSystem , kernelVersion , date )
1890
+ return fmt .Sprintf (template , socketCount , cpuModel , coreCount , tdp , htOnOff , turboOnOff , installedMem , biosVersion , uCodeVersion , nics , disks , operatingSystem , kernelVersion , date )
1861
1891
}
1862
1892
1863
1893
// getSectionsFromOutput parses output into sections, where the section name
0 commit comments