diff --git a/CHANGELOG.md b/CHANGELOG.md index 49894d2..926fc75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ For major (breaking) changes - version 3 and 2 see end of page. | Version | Date | Comment | | -------------- | -------------- | -------- | +| 4.23.9 | 2020-04-29 | `currentLoad()` workarround for no os.cpus info | | 4.23.8 | 2020-04-26 | `getMacAddresses()` fix added try catch | | 4.23.7 | 2020-04-26 | `getCpuCurrentSpeedSync()` workarround fix | | 4.23.6 | 2020-04-25 | `networkGatewayDefault()` bug fix no interfaces | diff --git a/docs/gettingstarted.html b/docs/gettingstarted.html index 078806e..21c9b64 100644 --- a/docs/gettingstarted.html +++ b/docs/gettingstarted.html @@ -56,13 +56,15 @@

Core Concept

Node.js comes with some basic OS information, but I always wanted a little more. So I came up to write this - little library. This library is still work in progress. It is supposed to be used as a node.js backend/server-side library (will definilely not work within a browser). It requires node.js version 4.0 and above.

+ little library. This library is still work in progress. It requires node.js version 4.0 and above.

I was able to test it on several Debian, Raspbian, Ubuntu distributions as well as macOS (Mavericks, Yosemite, El Captain, Sierra, High Sierra, Mojave) and some Windows 7, Windows 10, FreeBSD, OpenBSD, NetBSD and SunOS machines. Not all functions are supported on all operating systems. Have a look at the function reference in the docs to get further details.

If you have comments, suggestions & reports, please feel free to contact me on github!

I also created a nice little command line tool called mmon (micro-monitor) for Linux and macOS, also available via github and npm

+

Attention:

+

This library is supposed to be used as a node.js backend/server-side library and will definilely not work within a browser.

Installation

$ npm install systeminformation --save
diff --git a/docs/history.html b/docs/history.html index 9fbc1a7..d6565d6 100644 --- a/docs/history.html +++ b/docs/history.html @@ -83,14 +83,19 @@ + + 4.23.9 + 2020-04-29 + currentLoad() workarround for no os.cpus info + 4.23.8 - 2020-04-2& + 2020-04-26 getMacAddresses() fix added try catch 4.23.7 - 2020-04-2& + 2020-04-26 getCpuCurrentSpeedSync() workarround fix diff --git a/docs/index.html b/docs/index.html index b75c294..d44e651 100644 --- a/docs/index.html +++ b/docs/index.html @@ -168,7 +168,7 @@
systeminformation
-
Current Version: 4.23.8
+
Current Version: 4.23.9
diff --git a/lib/cpu.js b/lib/cpu.js index 8e0dc8d..17e2f15 100644 --- a/lib/cpu.js +++ b/lib/cpu.js @@ -1142,7 +1142,7 @@ function getLoad() { let totalIrq = 0; let totalIdle = 0; let cores = []; - _corecount = (cpus && cpus.length) ? cpus.length : 1; + _corecount = (cpus && cpus.length) ? cpus.length : 0; for (let i = 0; i < _corecount; i++) { const cpu = cpus[i].times; diff --git a/lib/network.js b/lib/network.js index fd1bf7e..404ba7c 100644 --- a/lib/network.js +++ b/lib/network.js @@ -763,7 +763,7 @@ function networkInterfaces(callback) { } mac = details.mac; // fallback due to https://github.com/nodejs/node/issues/13581 (node 8.1 - node 8.2) - if (mac.indexOf('00:00:0') > -1 && (_linux || _darwin)) { + if (mac.indexOf('00:00:0') > -1 && (_linux || _darwin) && parseInt(process.versions.node.split('.'), 10) === 8) { if (Object.keys(_mac).length === 0) { _mac = getMacAddresses(); }