From c1f8b65aaad08c546ac5d83cab5f895d26ea0de8 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sun, 29 Jan 2023 21:01:11 +0100 Subject: [PATCH] processes() fixed CPU usage info (windows) --- 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 12cb93f..b1bd0f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -82,6 +82,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.17.7 | 2023-01-29 | `processes()` fixed CPU usage info (windows) | | 5.17.6 | 2023-01-29 | `processes()` fixed Node Version 8 compatibility issue | | 5.17.5 | 2023-01-29 | `processes()` improved parsing of all services (linux) | | 5.17.4 | 2023-01-24 | `networkInterfaces()` sanitizing networkInterfaces device names | diff --git a/docs/history.html b/docs/history.html index c71266b..71cbb43 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@ + + 5.17.7 + 2023-01-29 + processes() fixed CPU usage info (windows) + 5.17.6 2023-01-29 diff --git a/docs/index.html b/docs/index.html index ade2e4a..7ebe8fb 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
-
New Version: 5.17.6
+
New Version: 5.17.7
diff --git a/lib/processes.js b/lib/processes.js index df1172b..68f2255 100644 --- a/lib/processes.js +++ b/lib/processes.js @@ -496,8 +496,8 @@ function calcProcStatWin(procStat, all, _cpu_old) { } return { pid: procStat.pid, - utime: cpuu > 0 ? procStat.utime : 0, - stime: cpus > 0 ? procStat.stime : 0, + utime: procStat.utime, + stime: procStat.stime, cpuu: cpuu > 0 ? cpuu : 0, cpus: cpus > 0 ? cpus : 0 };