diff --git a/CHANGELOG.md b/CHANGELOG.md index 9cce88c..3f751d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -82,6 +82,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.18.5 | 2023-06-26 | `cpu()` fixed parsing (mac OS) | | 5.18.4 | 2023-06-22 | `graphics()` fixed parsing (mac OS) | | 5.18.3 | 2023-06-09 | `tests` improved key handling, updated docs | | 5.18.2 | 2023-06-08 | `fsSize()` improved error handling (linux alpine) | diff --git a/docs/history.html b/docs/history.html index 3f0c5dd..6dfdfc9 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@ + + 5.18.5 + 2023-06-26 + cpu() fix parsing amd (mac OS) + 5.18.4 2023-06-22 diff --git a/docs/index.html b/docs/index.html index 02660d9..cf5d943 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
-
New Version: 5.18.4
+
New Version: 5.18.5
@@ -212,7 +212,7 @@
Downloads last month
-
619
+
622
Dependents
diff --git a/lib/cpu.js b/lib/cpu.js index dcd89c6..2e8b664 100644 --- a/lib/cpu.js +++ b/lib/cpu.js @@ -642,12 +642,16 @@ function getCpu() { const countCores = util.getValue(lines, 'hw.physicalcpu_max'); const countThreads = util.getValue(lines, 'hw.ncpu'); if (os.arch() === 'arm64') { - const clusters = execSync('ioreg -c IOPlatformDevice -d 3 -r | grep cluster-type').toString().split('\n'); - const efficiencyCores = clusters.filter(line => line.indexOf('"E"') >= 0).length; - const performanceCores = clusters.filter(line => line.indexOf('"P"') >= 0).length; result.socket = 'SOC'; - result.efficiencyCores = efficiencyCores; - result.performanceCores = performanceCores; + try { + const clusters = execSync('ioreg -c IOPlatformDevice -d 3 -r | grep cluster-type').toString().split('\n'); + const efficiencyCores = clusters.filter(line => line.indexOf('"E"') >= 0).length; + const performanceCores = clusters.filter(line => line.indexOf('"P"') >= 0).length; + result.efficiencyCores = efficiencyCores; + result.performanceCores = performanceCores; + } catch (e) { + util.noop(); + } } if (countProcessors) { result.processors = parseInt(countProcessors) || 1;