From a18969eaf3b6e1931ce54a4a20d18f771bc4fa6a Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Thu, 6 May 2021 12:34:56 +0200 Subject: [PATCH] processes() fixed Windows mem bug (naming conform to all platforms) --- CHANGELOG.md | 1 + docs/history.html | 5 +++++ docs/index.html | 2 +- lib/processes.js | 4 ++-- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 17b869a..b0a6f79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -77,6 +77,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | -------------- | -------------- | -------- | +| 5.6.18 | 2021-05-06 | `processes()` fixed Windows mem bug (naming conform to all platforms) | | 5.6.17 | 2021-05-05 | `networkInterfaces()` fixed Windows XP bug (WMIC NetEnabled) | | 5.6.16 | 2021-05-05 | `graphics()` fixed compare bug | | 5.6.15 | 2021-05-05 | restored Node 4.x compatibility | diff --git a/docs/history.html b/docs/history.html index 9c70050..61b29ee 100644 --- a/docs/history.html +++ b/docs/history.html @@ -56,6 +56,11 @@ + + 5.6.18 + 2021-05-06 + processes() fixed Windows mem bug (naming conform to all platforms) + 5.6.17 2021-05-05 diff --git a/docs/index.html b/docs/index.html index 3752c32..9e3a15b 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
-
New Version: 5.6.17
+
New Version: 5.6.18
diff --git a/lib/processes.js b/lib/processes.js index c569a22..e8931c3 100644 --- a/lib/processes.js +++ b/lib/processes.js @@ -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),