networkConnections() added PID, process

This commit is contained in:
Sebastian Hildebrandt
2019-07-01 16:57:50 +02:00
parent 29203851d0
commit 265d0f208b
6 changed files with 32 additions and 10 deletions
+1 -1
View File
@@ -855,7 +855,7 @@ function networkConnections(callback) {
let pid = -1;
let process = '';
if (line.length >= 7 && line[6].indexOf('users:') > -1) {
let proc = line[6].replace('users:(("', '').replace('"', '').split(',');
let proc = line[6].replace('users:(("', '').replace(/"/g, '').split(',');
if (proc.length > 2) {
process = proc[0].split(' ')[0];
pid = parseInt(proc[1], 10);