Skip to content

Commit

Permalink
processLoad() linux fix * (linux)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebhildebrandt committed Aug 21, 2024
1 parent 642312e commit 55a1fc2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/processes.js
Original file line number Diff line number Diff line change
Expand Up @@ -1153,7 +1153,7 @@ function processLoad(proc, callback) {
lines.forEach(function (line) {
let data = line.trim().replace(/ +/g, ' ').split(' ');
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);
procStats.push({
name,
Expand Down

0 comments on commit 55a1fc2

Please sign in to comment.