services() added pids (windows)

This commit is contained in:
Sebastian Hildebrandt 2020-02-17 20:11:28 +01:00
parent 56d5ac7fa5
commit 59006046cb
5 changed files with 11 additions and 2 deletions

View File

@ -30,6 +30,7 @@ For major (breaking) changes - version 3 and 2 see end of page.
| Version | Date | Comment | | 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.3 | 2020-02-16 | `versions()` fixed mysql version (macOS) |
| 4.21.2 | 2020-02-11 | `networkConnections()` fixed linux (debian) issue | | 4.21.2 | 2020-02-11 | `networkConnections()` fixed linux (debian) issue |
| 4.21.1 | 2020-01-31 | `networkGatewayDefault()` fixed windows 7 issue | | 4.21.1 | 2020-01-31 | `networkGatewayDefault()` fixed windows 7 issue |

View File

@ -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].name | X | X | X | X | | name of service |
| | [0].running | X | X | X | X | | true / false | | | [0].running | X | X | X | X | | true / false |
| | [0].startmode | | | | X | | manual, automatic, ... | | | [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].pcpu | X | X | X | | | process % CPU |
| | [0].pmem | X | X | X | | | process % MEM | | | [0].pmem | X | X | X | | | process % MEM |

View File

@ -83,6 +83,11 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr>
<th scope="row">4.22.0</th>
<td>2020-02-17</td>
<td><span class="code">services()</span> added pids (windows)</td>
</tr>
<tr> <tr>
<th scope="row">4.21.3</th> <th scope="row">4.21.3</th>
<td>2020-02-16</td> <td>2020-02-16</td>

View File

@ -168,7 +168,7 @@
<img class="logo" src="assets/logo.png"> <img class="logo" src="assets/logo.png">
<div class="title">systeminformation</div> <div class="title">systeminformation</div>
<div class="subtitle"><span id="typed"></span></div> <div class="subtitle"><span id="typed"></span></div>
<div class="version">Current Version: <span id="version">4.21.3</span></div> <div class="version">Current Version: <span id="version">4.22.0</span></div>
<button class="btn btn-light" onclick="location.href='https://github.com/sebhildebrandt/systeminformation'">View on Github <i class=" fab fa-github"></i></button> <button class="btn btn-light" onclick="location.href='https://github.com/sebhildebrandt/systeminformation'">View on Github <i class=" fab fa-github"></i></button>
</div> </div>
<div class="down"> <div class="down">

View File

@ -260,11 +260,13 @@ function services(srv, callback) {
let srvName = util.getValue(lines, 'Name', '=', true).toLowerCase(); let srvName = util.getValue(lines, 'Name', '=', true).toLowerCase();
let started = util.getValue(lines, 'Started', '=', true); let started = util.getValue(lines, 'Started', '=', true);
let startMode = util.getValue(lines, 'StartMode', '=', true); let startMode = util.getValue(lines, 'StartMode', '=', true);
let pid = util.getValue(lines, 'ProcessId', '=', true);
if (srv === '*' || srvs.indexOf(srvName) >= 0) { if (srv === '*' || srvs.indexOf(srvName) >= 0) {
result.push({ result.push({
name: srvName, name: srvName,
running: (started === 'TRUE'), running: (started === 'TRUE'),
startmode: startMode, startmode: startMode,
pids: [ pid],
pcpu: 0, pcpu: 0,
pmem: 0 pmem: 0
}); });
@ -281,6 +283,7 @@ function services(srv, callback) {
name: srvName, name: srvName,
running: false, running: false,
startmode: '', startmode: '',
pids: [],
pcpu: 0, pcpu: 0,
pmem: 0 pmem: 0
}); });