processLoad() linux fix * (linux)
This commit is contained in:
parent
642312e166
commit
55a1fc2a3a
@ -1153,7 +1153,7 @@ function processLoad(proc, callback) {
|
|||||||
lines.forEach(function (line) {
|
lines.forEach(function (line) {
|
||||||
let data = line.trim().replace(/ +/g, ' ').split(' ');
|
let data = line.trim().replace(/ +/g, ' ').split(' ');
|
||||||
if (data.length > 4) {
|
if (data.length > 4) {
|
||||||
const linuxName = data[4].indexOf('/') >= 0 ? data[4].substring(0, data[4].indexOf('/') - 1) : data[4];
|
const linuxName = data[4].indexOf('/') >= 0 ? data[4].substring(0, data[4].indexOf('/')) : data[4];
|
||||||
const name = _linux ? (linuxName) : data[4].substring(data[4].lastIndexOf('/') + 1);
|
const name = _linux ? (linuxName) : data[4].substring(data[4].lastIndexOf('/') + 1);
|
||||||
procStats.push({
|
procStats.push({
|
||||||
name,
|
name,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user