From bacc87f01d8faf96b69098232a9a0ca05de1cf10 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Thu, 11 Aug 2022 18:12:24 +0200 Subject: [PATCH] cpu() virtualization fix (mac OS) --- CHANGELOG.md | 1 + docs/cpu.html | 4 ++-- docs/history.html | 5 +++++ docs/index.html | 4 ++-- lib/cpu.js | 1 + 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bac431b..2bd8591 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -80,6 +80,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | -------------- | -------------- | -------- | +| 5.12.5 | 2022-08-11 | `cpu()` virtualization fix (mac OS) | | 5.12.4 | 2022-08-09 | `cpuTemperature()` fix main (linux) | | 5.12.3 | 2022-08-04 | `networkInterfaces()` operstate fix (mac OS) | | 5.12.2 | 2022-08-01 | `services()` Ubuntu 22.04 fix | diff --git a/docs/cpu.html b/docs/cpu.html index 6d81cdd..da0cf1d 100644 --- a/docs/cpu.html +++ b/docs/cpu.html @@ -574,12 +574,12 @@ si.cpuCurrentSpeed().then(data => console.log(data));
 {
-  main: 42,
+  main: 34,
   cores: [
     34, 35, 33, 32,
     37, 32, 35, 33
   ],
-  max: 42,
+  max: 37,
   socket: [ 16.8, 27.8 ],
   chipset: 49
 }
diff --git a/docs/history.html b/docs/history.html
index 8fecc4c..82629c5 100644
--- a/docs/history.html
+++ b/docs/history.html
@@ -57,6 +57,11 @@
                     
                   
                   
+                    
+                      5.12.5
+                      2022-08-11
+                      cpu() virtualization fix (mac OS)
+                    
                     
                       5.12.4
                       2022-08-09
diff --git a/docs/index.html b/docs/index.html
index 12d5bc0..969d8e3 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -170,7 +170,7 @@
       
       
systeminformation
 
-
New Version: 5.12.4
+
New Version: 5.12.5
@@ -214,7 +214,7 @@
Downloads last month
-
557
+
558
Dependents
diff --git a/lib/cpu.js b/lib/cpu.js index b91c5aa..c351f97 100644 --- a/lib/cpu.js +++ b/lib/cpu.js @@ -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');