cpu() added governor (linux)
This commit is contained in:
+58
-2
@@ -122,7 +122,61 @@ const AMDBaseFrequencies = {
|
||||
'7251': '2.1',
|
||||
'7551P': '2.0',
|
||||
'7401P': '2.0',
|
||||
'7351P': '2.4'
|
||||
'7351P': '2.4',
|
||||
'2300X': '3.5',
|
||||
'2500X': '3.6',
|
||||
'2600': '3.1',
|
||||
'2600E': '3.1',
|
||||
'2600X': '3.6',
|
||||
'2700': '3.2',
|
||||
'2700E': '2.8',
|
||||
'2700X': '3.7',
|
||||
'Pro 2700X': '3.6',
|
||||
'2920': '3.5',
|
||||
'2950': '3.5',
|
||||
'2970WX': '3.0',
|
||||
'2990WX': '3.0',
|
||||
'3200U': '2.6',
|
||||
'3300U': '2.1',
|
||||
'3500U': '2.1',
|
||||
'3550H': '2.1',
|
||||
'3580U': '2.1',
|
||||
'3700U': '2.3',
|
||||
'3750H': '2.3',
|
||||
'3780U': '2.3',
|
||||
'3500X': '3.6',
|
||||
'3600': '3.6',
|
||||
'Pro 3600': '3.6',
|
||||
'3600X': '3.8',
|
||||
'Pro 3700': '3.6',
|
||||
'3700X': '3.6',
|
||||
'3800X': '3.9',
|
||||
'3900': '3.1',
|
||||
'Pro 3900': '3.1',
|
||||
'3900X': '3.8',
|
||||
'3950X': '3.5',
|
||||
'3960X': '3.8',
|
||||
'3970X': '3.7',
|
||||
'7232P': '3.1',
|
||||
'7302P': '3.0',
|
||||
'7402P': '2.8',
|
||||
'7502P': '2.5',
|
||||
'7702P': '2.0',
|
||||
'7252': '3.1',
|
||||
'7262': '3.2',
|
||||
'7272': '2.9',
|
||||
'7282': '2.8',
|
||||
'7302': '3.0',
|
||||
'7352': '2.3',
|
||||
'7402': '2.8',
|
||||
'7452': '2.35',
|
||||
'7502': '2.5',
|
||||
'7542': '2.9',
|
||||
'7552': '2.2',
|
||||
'7642': '2.3',
|
||||
'7702': '2.0',
|
||||
'7742': '2.25',
|
||||
'7H12': '2.6'
|
||||
};
|
||||
|
||||
const socketTypes = {
|
||||
@@ -240,6 +294,7 @@ function getCpu() {
|
||||
speed: '0.00',
|
||||
speedmin: '',
|
||||
speedmax: '',
|
||||
governor: '',
|
||||
cores: util.cores(),
|
||||
physicalCores: util.cores(),
|
||||
processors: 1,
|
||||
@@ -283,7 +338,7 @@ function getCpu() {
|
||||
let modelline = '';
|
||||
let lines = [];
|
||||
if (os.cpus()[0] && os.cpus()[0].model) modelline = os.cpus()[0].model;
|
||||
exec('export LC_ALL=C; lscpu; unset LC_ALL', function (error, stdout) {
|
||||
exec('export LC_ALL=C; lscpu; echo -n "Governor: "; cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor 2>/dev/null; echo; unset LC_ALL', function (error, stdout) {
|
||||
if (!error) {
|
||||
lines = stdout.toString().split('\n');
|
||||
}
|
||||
@@ -327,6 +382,7 @@ function getCpu() {
|
||||
let processorsInt = parseInt(processors, 10);
|
||||
result.physicalCores = result.cores / threadsPerCoreInt;
|
||||
result.processors = processorsInt;
|
||||
result.governor = util.getValue(lines, 'governor') || '';
|
||||
|
||||
// socket type
|
||||
let lines2 = [];
|
||||
|
||||
Reference in New Issue
Block a user