From 6c4e34004abb95f5b46c6ce2bfc91a78596a7751 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sat, 19 Nov 2022 09:48:48 +0100 Subject: [PATCH] blockDevices() added raid group member (linux) --- CHANGELOG.md | 1 + README.md | 2 ++ docs/filesystem.html | 10 ++++++++++ docs/history.html | 5 +++++ docs/index.html | 2 +- lib/filesystem.js | 2 +- 6 files changed, 20 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f80cfe4..5a70c10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -81,6 +81,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.14.0 | 2022-11-10 | `blockDevices()` added raid group member (linux) | | 5.13.5 | 2022-11-18 | `users()` fix parsing issue (windows) | | 5.13.4 | 2022-11-18 | `users()` fix Get-CimInstance issue (windows) | | 5.13.3 | 2022-11-18 | `cpuTemperature()` fix main temp (linux) | diff --git a/README.md b/README.md index e82017b..4399dcf 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,7 @@ si.cpu() (last 7 major and minor version releases) +- Version 5.14.0: `blockDevices()` added raid group member (linux) - Version 5.13.0: `networkConnections()` added process name (mac OS) - Version 5.12.0: `cpu()` added performance and efficiency cores - Version 5.11.0: `networkInterfaces()` added default property and default parameter @@ -464,6 +465,7 @@ Full function reference with examples can be found at [https://systeminformation | | [0].serial | X | | | X | | serial | | | [0].removable | X | | X | X | | serial | | | [0].protocol | X | | X | | | protocol (SATA, PCI-Express, ...) | +| | [0].group | X | | | | | Raid group member (e.g. md1) | | si.disksIO(cb) | {...} | X | | X | | | current transfer stats | | | rIO | X | | X | | | read IOs on all mounted drives | | | wIO | X | | X | | | write IOs on all mounted drives | diff --git a/docs/filesystem.html b/docs/filesystem.html index 1b0e02e..9fe9e69 100644 --- a/docs/filesystem.html +++ b/docs/filesystem.html @@ -426,6 +426,16 @@ si.diskLayout().then(data => console.log(data)); protocol (SATA, PCI-Express, ...) + + + [0].group + X + + + + + Raid group member (e.g. md1) + diff --git a/docs/history.html b/docs/history.html index 31e6c1f..52bdc55 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@ + + 5.14.0 + 2022-11-19 + blockDevices() added raid group (linux) + 5.13.5 2022-11-18 diff --git a/docs/index.html b/docs/index.html index c3ffece..6c71760 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
-
New Version: 5.13.5
+
New Version: 5.14.0
diff --git a/lib/filesystem.js b/lib/filesystem.js index bc401bb..0238821 100644 --- a/lib/filesystem.js +++ b/lib/filesystem.js @@ -375,7 +375,7 @@ function raidMatchLunix(data) { if (element.type.startsWith('raid')) { const lines = execSync(`mdadm --export --detail /dev/${element.name}`).toString().split('\n'); const mdData = decodeMdabmData(lines); - if (mdData && mdData.members && mdData.members.length && mdData.raid === element.type) { + if (mdData.members && mdData.members.length && mdData.raid === element.type) { result = result.map(blockdevice => { if (blockdevice.fsType === 'linux_raid_member' && mdData.members.indexOf(blockdevice.name) >= 0) { blockdevice.group = element.name;