From e30dfb3cf619f9540db396549a1290b836d29c27 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sat, 23 Mar 2019 07:27:09 +0100 Subject: [PATCH 1/6] updated docs --- CHANGELOG.md | 1 + README.md | 12 ++++++------ docs/history.html | 5 +++++ docs/index.html | 4 ++-- docs/network.html | 20 ++++++++++---------- docs/system.html | 2 +- 6 files changed, 25 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 17e6840..b732675 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.1.2 | 2019-03-23 | updated dics | | 4.1.1 | 2019-03-13 | updated typescript typings | | 4.1.0 | 2019-03-13 | `versions()` added pip, pip3 | | 4.0.16 | 2019-03-12 | Happy birthday - 5th aniversary | diff --git a/README.md b/README.md index a699e20..dab3b7c 100644 --- a/README.md +++ b/README.md @@ -146,7 +146,7 @@ I also created a nice little command line tool called [mmon][mmon-github-url] ( | | version | X | X | X | X | | version e.g. '1.0' | | | serial | X | X | X | X | | serial number | | | uuid | X | X | X | X | | UUID | -| | sku | X | X | | X | | SKU number | +| | sku | X | X | X | X | | SKU number | | si.bios(cb) | {...} | X | X | X | X | | bios information | | | vendor | X | X | X | X | | e.g. 'AMI' | | | version | X | X | | X | | version | @@ -426,11 +426,11 @@ I also created a nice little command line tool called [mmon][mmon-github-url] ( | | [0].ip6 | X | X | X | X | X | ip6 address | | | [0].mac | X | X | X | X | X | MAC address | | | [0].internal | X | X | X | X | X | true if internal interface | -| | [0].operstate | X | | | X | | up / down | -| | [0].type | X | | | X | | wireless / wired | -| | [0].duplex | X | | | | | duplex | -| | [0].mtu | X | | | | | maximum transmission unit | -| | [0].speed | X | | | X | | speed in MBit / s | +| | [0].operstate | X | | X | X | | up / down | +| | [0].type | X | | X | X | | wireless / wired | +| | [0].duplex | X | | X | | | duplex | +| | [0].mtu | X | | X | | | maximum transmission unit | +| | [0].speed | X | | X | X | | speed in MBit / s | | | [0].carrierChanges | X | | | | | # changes up/down | | si.networkInterfaceDefault(cb) | : string | X | X | X | X | X | get name of default network interface | | si.networkStats(ifaces,cb) | [{...}] | X | X | X | X | | current network stats of given interfaces
iface list: space or comma separated
iface parameter is optional
defaults to first external network interface,
Pass '*' for all interfaces | diff --git a/docs/history.html b/docs/history.html index 27b8408..09bad02 100644 --- a/docs/history.html +++ b/docs/history.html @@ -80,6 +80,11 @@ + + 4.1.2 + 2019-03-23 + updated dics + 4.1.1 2019-03-13 diff --git a/docs/index.html b/docs/index.html index 1b83f4d..1d88b62 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
-
Current Version: 4.1.1
+
Current Version: 4.1.2
@@ -201,7 +201,7 @@
Downloads last month
-
135
+
139
Dependends
diff --git a/docs/network.html b/docs/network.html index bdf52b3..09d1bdc 100644 --- a/docs/network.html +++ b/docs/network.html @@ -139,7 +139,7 @@ [0].operstate X - X + X X @@ -149,7 +149,7 @@ [0].type X - X + X X @@ -159,9 +159,9 @@ [0].duplex X + X - X - X + duplex (full/half) @@ -169,9 +169,9 @@ [0].mtu X + X - X - X + MUT maximum transmission unit @@ -179,7 +179,7 @@ [0].speed X - X + X X @@ -189,9 +189,9 @@ [0].carrierChanges X - X - X - X + + + # changes up/down diff --git a/docs/system.html b/docs/system.html index 31d7487..5b6880a 100644 --- a/docs/system.html +++ b/docs/system.html @@ -130,7 +130,7 @@ sku X X - + X X SKU number From d110419c4f6a3022b42509341e650b33023c767a Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sat, 23 Mar 2019 07:27:20 +0100 Subject: [PATCH 2/6] 4.1.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 202065d..de06f5c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "4.1.1", + "version": "4.1.2", "description": "Simple system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)", From 6fcf575ad5ab51f9abb789ce10a3bc8b1eb579ba Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sun, 24 Mar 2019 20:11:54 +0100 Subject: [PATCH 3/6] wmic path detection (windows) --- CHANGELOG.md | 9 +++++---- README.md | 1 - docs/history.html | 7 ++++++- docs/index.html | 4 ++-- lib/util.js | 10 +++++++--- 5 files changed, 20 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b732675..69f912d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,7 +30,8 @@ For major (breaking) changes - version 3 and 2 see end of page. | Version | Date | Comment | | -------------- | -------------- | -------- | -| 4.1.2 | 2019-03-23 | updated dics | +| 4.1.3 | 2019-03-24 | wmic path detection (windows) | +| 4.1.2 | 2019-03-23 | updated docs | | 4.1.1 | 2019-03-13 | updated typescript typings | | 4.1.0 | 2019-03-13 | `versions()` added pip, pip3 | | 4.0.16 | 2019-03-12 | Happy birthday - 5th aniversary | @@ -108,7 +109,7 @@ For major (breaking) changes - version 3 and 2 see end of page. | 3.42.2 | 2018-07-03 | `users()` optimized results if lack of permissions | | 3.42.1 | 2018-07-03 | `versions()` bugfix git version macOS | | 3.42.0 | 2018-06-01 | `processes()` added parent process PID | -| 3.41.4 | 2018-05-28 | windows exec WMIC in try catch | +| 3.41.4 | 2018-05-28 | windows exec WMIC path detection (windows) in try catch | | 3.41.3 | 2018-05-13 | improved SunOS support `getStaticData()`, `getDynamicData()` | | 3.41.2 | 2018-05-13 | bugfix `system()` and `flags()` Raspberry Pi | | 3.41.1 | 2018-05-11 | updated docs | @@ -139,8 +140,8 @@ For major (breaking) changes - version 3 and 2 see end of page. | 3.33.13 | 2018-01-12 | bugfix `memLayout()` (Windows) | | 3.33.12 | 2017-12-25 | fixed typos | | 3.33.11 | 2017-12-17 | updated docs | -| 3.33.10 | 2017-12-14 | bugfix WMIC blockDevice parse (Windows 7) | -| 3.33.9 | 2017-12-14 | bugfix WMIC not found (Windows) | +| 3.33.10 | 2017-12-14 | bugfix WMIC path detection (windows) blockDevice parse (Windows 7) | +| 3.33.9 | 2017-12-14 | bugfix WMIC path detection (windows) not found (Windows) | | 3.33.8 | 2017-12-02 | bugfix diskLayout().size (OSX) | | 3.33.7 | 2017-11-28 | bugfix diskLayout().size | | 3.33.6 | 2017-11-16 | bugfix diskLayout().size | diff --git a/README.md b/README.md index dab3b7c..b2ce432 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,6 @@ si.cpu() - Version 3.52.0: `cpu()` added physical cores, processors, socket type - Version 3.51.0: `processLoad()` added for windows - Version 3.50.0: `services()` added possibility to specify ALL services "*" for linux/win -- Version 3.49.0: `uuid()` added - os specific uuid (per installation) - ... You can find all changes here: [detailed changelog][changelog-url] diff --git a/docs/history.html b/docs/history.html index 09bad02..4618f5e 100644 --- a/docs/history.html +++ b/docs/history.html @@ -80,10 +80,15 @@ + + 4.1.3 + 2019-03-24 + wmic path detection (windows) + 4.1.2 2019-03-23 - updated dics + updated docs 4.1.1 diff --git a/docs/index.html b/docs/index.html index 1d88b62..b4c096f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
-
Current Version: 4.1.2
+
Current Version: 4.1.3
@@ -201,7 +201,7 @@
Downloads last month
-
139
+
141
Dependends
diff --git a/lib/util.js b/lib/util.js index 815d4a2..d43be94 100644 --- a/lib/util.js +++ b/lib/util.js @@ -221,9 +221,13 @@ function findObjectByKey(array, key, value) { function getWmic() { if (os.type() === 'Windows_NT' && !wmic) { - if (fs.existsSync(process.env.WINDIR + '\\system32\\wbem\\wmic.exe')) { - wmic = process.env.WINDIR + '\\system32\\wbem\\wmic.exe'; - } else wmic = 'wmic'; + try { + wmic = execSync('WHERE WMIC').toString().trim(); + } catch (e) { + if (fs.existsSync(process.env.WINDIR + '\\system32\\wbem\\wmic.exe')) { + wmic = process.env.WINDIR + '\\system32\\wbem\\wmic.exe'; + } else wmic = 'wmic'; + } } return wmic; } From aa60c122b278e4a78c221f071852377d1e64d68f Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sun, 24 Mar 2019 20:12:03 +0100 Subject: [PATCH 4/6] 4.1.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index de06f5c..323d636 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "4.1.2", + "version": "4.1.3", "description": "Simple system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)", From dea549d0ff959d93fa7d73db38fd404d6153d92f Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Tue, 26 Mar 2019 21:43:56 +0100 Subject: [PATCH 5/6] networkInterfaces() speed bug (windows) --- CHANGELOG.md | 1 + docs/history.html | 5 +++++ docs/index.html | 6 +++--- lib/network.js | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 69f912d..32f48cc 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.1.4 | 2019-03-26 | `networkInterfaces()` speed bug (windows) | | 4.1.3 | 2019-03-24 | wmic path detection (windows) | | 4.1.2 | 2019-03-23 | updated docs | | 4.1.1 | 2019-03-13 | updated typescript typings | diff --git a/docs/history.html b/docs/history.html index 4618f5e..8f99885 100644 --- a/docs/history.html +++ b/docs/history.html @@ -80,6 +80,11 @@ + + 4.1.4 + 2019-03-26 + networkInterfaces() speed bug (windows) + 4.1.3 2019-03-24 diff --git a/docs/index.html b/docs/index.html index b4c096f..b0c4c81 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
-
Current Version: 4.1.3
+
Current Version: 4.1.4
@@ -193,7 +193,7 @@
-
8,215
+
8,219
Lines of code
@@ -201,7 +201,7 @@
Downloads last month
-
141
+
146
Dependends
diff --git a/lib/network.js b/lib/network.js index 7a23be3..799aa7d 100644 --- a/lib/network.js +++ b/lib/network.js @@ -163,7 +163,7 @@ function parseLinesWindowsNics(sections) { let lines = sections[i].trim().split('\r\n'); let netEnabled = util.getValue(lines, 'NetEnabled', '='); if (netEnabled) { - const speed = parseInt(util.getValue(lines, 'speed', '=').trim(), 10); + const speed = parseInt(util.getValue(lines, 'speed', '=').trim(), 10) / 1000000; nics.push({ mac: util.getValue(lines, 'MACAddress', '=').toLowerCase(), name: util.getValue(lines, 'Name', '=').replace(/\]/g, ')').replace(/\[/g, '('), From b36f7a827073c6e2b8a7ef7263f1fe212916e405 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Tue, 26 Mar 2019 21:44:09 +0100 Subject: [PATCH 6/6] 4.1.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 323d636..22426d6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "4.1.3", + "version": "4.1.4", "description": "Simple system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)",