cpu() Handle RISC-V CPU Manufacturer and Brand
This commit is contained in:
+5
-2
@@ -1544,8 +1544,11 @@ function networkConnections(callback) {
|
||||
processes = processes.map((line => { return line.trim().replace(/ +/g, ' '); }));
|
||||
let lines = stdout.toString().split('\n');
|
||||
lines.shift();
|
||||
const header = lines.shift().replace(/ Address/g, '_Address').replace(/ +/g, ' ').split(' ');
|
||||
let pidPos = header.indexOf('pid');
|
||||
let pidPos = 8;
|
||||
if (lines.length > 1 && lines[0].indexOf('pid') > 0) {
|
||||
const header = (lines.shift() || '').replace(/ Address/g, '_Address').replace(/ +/g, ' ').split(' ');
|
||||
pidPos = header.indexOf('pid');
|
||||
}
|
||||
lines.forEach(function (line) {
|
||||
line = line.replace(/ +/g, ' ').split(' ');
|
||||
if (line.length >= 8) {
|
||||
|
||||
Reference in New Issue
Block a user