systeminformation 5.23.17 → 5.23.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cpu.js +14 -0
- package/lib/network.js +5 -2
- package/package.json +1 -1
package/lib/cpu.js
CHANGED
|
@@ -605,6 +605,9 @@ function cpuManufacturer(str) {
|
|
|
605
605
|
if (str.indexOf('Xen') >= 0) { result = 'Xen Hypervisor'; }
|
|
606
606
|
if (str.indexOf('tcg') >= 0) { result = 'QEMU'; }
|
|
607
607
|
if (str.indexOf('apple') >= 0) { result = 'Apple'; }
|
|
608
|
+
if (str.indexOf('sifive') >= 0) { result = 'SiFive'; }
|
|
609
|
+
if (str.indexOf('thead') >= 0) { result = 'T-Head'; }
|
|
610
|
+
if (str.indexOf('andestech') >= 0) { result = 'Andes Technology'; }
|
|
608
611
|
|
|
609
612
|
return result;
|
|
610
613
|
}
|
|
@@ -788,6 +791,17 @@ function getCpu() {
|
|
|
788
791
|
}
|
|
789
792
|
}
|
|
790
793
|
|
|
794
|
+
// Test RISC-V
|
|
795
|
+
if (util.getValue(lines, 'architecture') === 'riscv64') {
|
|
796
|
+
const linesRiscV = fs.readFileSync('/proc/cpuinfo').toString().split('\n');
|
|
797
|
+
const uarch = util.getValue(linesRiscV, 'uarch') || '';
|
|
798
|
+
if (uarch.indexOf(',') > -1) {
|
|
799
|
+
const split = uarch.split(',');
|
|
800
|
+
result.manufacturer = cpuManufacturer(split[0]);
|
|
801
|
+
result.brand = split[1];
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
|
|
791
805
|
// socket type
|
|
792
806
|
let lines2 = [];
|
|
793
807
|
exec('export LC_ALL=C; dmidecode –t 4 2>/dev/null | grep "Upgrade: Socket"; unset LC_ALL', function (error2, stdout2) {
|
package/lib/network.js
CHANGED
|
@@ -1544,8 +1544,11 @@ function networkConnections(callback) {
|
|
|
1544
1544
|
processes = processes.map((line => { return line.trim().replace(/ +/g, ' '); }));
|
|
1545
1545
|
let lines = stdout.toString().split('\n');
|
|
1546
1546
|
lines.shift();
|
|
1547
|
-
|
|
1548
|
-
|
|
1547
|
+
let pidPos = 8;
|
|
1548
|
+
if (lines.length > 1 && lines[0].indexOf('pid') > 0) {
|
|
1549
|
+
const header = (lines.shift() || '').replace(/ Address/g, '_Address').replace(/ +/g, ' ').split(' ');
|
|
1550
|
+
pidPos = header.indexOf('pid');
|
|
1551
|
+
}
|
|
1549
1552
|
lines.forEach(function (line) {
|
|
1550
1553
|
line = line.replace(/ +/g, ' ').split(' ');
|
|
1551
1554
|
if (line.length >= 8) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "systeminformation",
|
|
3
|
-
"version": "5.23.
|
|
3
|
+
"version": "5.23.18",
|
|
4
4
|
"description": "Advanced, lightweight system and OS information library",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Sebastian Hildebrandt <hildebrandt@plus-innovations.com> (https://plus-innovations.com)",
|