processes() fixed Windows mem bug (naming conform to all platforms)
This commit is contained in:
+2
-2
@@ -789,7 +789,7 @@ function processes(callback) {
|
||||
let commandPath = util.getValue(lines, 'ExecutablePath', '=', true);
|
||||
let utime = parseInt(util.getValue(lines, 'UserModeTime', '=', true), 10);
|
||||
let stime = parseInt(util.getValue(lines, 'KernelModeTime', '=', true), 10);
|
||||
let mem = parseInt(util.getValue(lines, 'WorkingSetSize', '=', true), 10);
|
||||
let memw = parseInt(util.getValue(lines, 'WorkingSetSize', '=', true), 10);
|
||||
allcpuu = allcpuu + utime;
|
||||
allcpus = allcpus + stime;
|
||||
result.all++;
|
||||
@@ -812,7 +812,7 @@ function processes(callback) {
|
||||
cpu: 0,
|
||||
cpuu: 0,
|
||||
cpus: 0,
|
||||
pmem: mem / os.totalmem() * 100,
|
||||
mem: memw / os.totalmem() * 100,
|
||||
priority: parseInt(util.getValue(lines, 'Priority', '=', true), 10),
|
||||
memVsz: parseInt(util.getValue(lines, 'PageFileUsage', '=', true), 10),
|
||||
memRss: Math.floor(parseInt(util.getValue(lines, 'WorkingSetSize', '=', true), 10) / 1024),
|
||||
|
||||
Reference in New Issue
Block a user