cpu() virtualization fix (mac OS)

This commit is contained in:
Sebastian Hildebrandt
2022-08-11 18:12:24 +02:00
parent ab2f0ca14d
commit bacc87f01d
5 changed files with 11 additions and 4 deletions
+1
View File
@@ -645,6 +645,7 @@ function getCpu() {
result.family = util.getValue(lines, 'machdep.cpu.family') || util.getValue(lines, 'hw.cpufamily');
result.model = util.getValue(lines, 'machdep.cpu.model');
result.stepping = util.getValue(lines, 'machdep.cpu.stepping') || util.getValue(lines, 'hw.cpusubfamily');
result.virtualization = true;
const countProcessors = util.getValue(lines, 'hw.packages');
const countCores = util.getValue(lines, 'hw.physicalcpu_max');
const countThreads = util.getValue(lines, 'hw.ncpu');