From 59006046cb98dc38e11886df2df5b9012ced78ff Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Mon, 17 Feb 2020 20:11:28 +0100 Subject: [PATCH] services() added pids (windows) --- CHANGELOG.md | 1 + README.md | 2 +- docs/history.html | 5 +++++ docs/index.html | 2 +- lib/processes.js | 3 +++ 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d492634..c4ccc44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ For major (breaking) changes - version 3 and 2 see end of page. | Version | Date | Comment | | -------------- | -------------- | -------- | +| 4.22.0 | 2020-02-17 | `services()` added pids (windows) | | 4.21.3 | 2020-02-16 | `versions()` fixed mysql version (macOS) | | 4.21.2 | 2020-02-11 | `networkConnections()` fixed linux (debian) issue | | 4.21.1 | 2020-01-31 | `networkGatewayDefault()` fixed windows 7 issue | diff --git a/README.md b/README.md index f1c5649..4d3bd8b 100644 --- a/README.md +++ b/README.md @@ -355,7 +355,7 @@ I also created a nice little command line tool called [mmon][mmon-github-url] ( | | [0].name | X | X | X | X | | name of service | | | [0].running | X | X | X | X | | true / false | | | [0].startmode | | | | X | | manual, automatic, ... | -| | [0].pids | X | X | X | | | pids | +| | [0].pids | X | X | X | X | | pids | | | [0].pcpu | X | X | X | | | process % CPU | | | [0].pmem | X | X | X | | | process % MEM | diff --git a/docs/history.html b/docs/history.html index d2af45c..a4fc72b 100644 --- a/docs/history.html +++ b/docs/history.html @@ -83,6 +83,11 @@ + + 4.22.0 + 2020-02-17 + services() added pids (windows) + 4.21.3 2020-02-16 diff --git a/docs/index.html b/docs/index.html index f29e218..cfa35a7 100644 --- a/docs/index.html +++ b/docs/index.html @@ -168,7 +168,7 @@
systeminformation
-
Current Version: 4.21.3
+
Current Version: 4.22.0
diff --git a/lib/processes.js b/lib/processes.js index 2938e5a..075a216 100644 --- a/lib/processes.js +++ b/lib/processes.js @@ -260,11 +260,13 @@ function services(srv, callback) { let srvName = util.getValue(lines, 'Name', '=', true).toLowerCase(); let started = util.getValue(lines, 'Started', '=', true); let startMode = util.getValue(lines, 'StartMode', '=', true); + let pid = util.getValue(lines, 'ProcessId', '=', true); if (srv === '*' || srvs.indexOf(srvName) >= 0) { result.push({ name: srvName, running: (started === 'TRUE'), startmode: startMode, + pids: [ pid], pcpu: 0, pmem: 0 }); @@ -281,6 +283,7 @@ function services(srv, callback) { name: srvName, running: false, startmode: '', + pids: [], pcpu: 0, pmem: 0 });