currentLoad() fixed issue

This commit is contained in:
Sebastian Hildebrandt 2021-02-11 20:06:24 +01:00
parent 0a20e59a88
commit 165aac9e6b
4 changed files with 13 additions and 6 deletions

View File

@ -72,6 +72,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.
| Version | Date | Comment |
| -------------- | -------------- | -------- |
| 5.2.4 | 2020-02-11 | `currentLoad()` fixed issue |
| 5.2.3 | 2020-02-11 | `diskLayout()` added USB drives (mac OS) |
| 5.2.2 | 2020-02-11 | code cleanup, updated docs |
| 5.2.1 | 2020-02-10 | `system()` fixed issue virtual detect (linux) |

View File

@ -56,6 +56,11 @@
</tr>
</thead>
<tbody>
<tr>
<th scope="row">5.2.4</th>
<td>2020-02-11</td>
<td><span class="code">currentLoad()</span> fix issue</td>
</tr>
<tr>
<th scope="row">5.2.3</th>
<td>2020-02-11</td>

View File

@ -170,7 +170,7 @@
<img class="logo" src="assets/logo.png">
<div class="title">systeminformation</div>
<div class="subtitle"><span id="typed"></span>&nbsp;</div>
<div class="version">New Version: <span id="version">5.2.3</span></div>
<div class="version">New Version: <span id="version">5.2.4</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>
</div>
<div class="down">

View File

@ -1406,11 +1406,11 @@ function getLoad() {
_cpus[i].loadIrq = (_cpus[i].irq - tmpIrq);
cores[i] = {};
cores[i].load = _cpus[i].load / _cpus[i].currentTick * 100;
cores[i].loadUser = _cpus[i].load_user / _cpus[i].currentTick * 100;
cores[i].loadSystem = _cpus[i].load_system / _cpus[i].currentTick * 100;
cores[i].loadNice = _cpus[i].load_nice / _cpus[i].currentTick * 100;
cores[i].loadIdle = _cpus[i].load_idle / _cpus[i].currentTick * 100;
cores[i].loadIrq = _cpus[i].load_irq / _cpus[i].currentTick * 100;
cores[i].loadUser = _cpus[i].loadUser / _cpus[i].currentTick * 100;
cores[i].loadSystem = _cpus[i].loadSystem / _cpus[i].currentTick * 100;
cores[i].loadNice = _cpus[i].loadNice / _cpus[i].currentTick * 100;
cores[i].loadIdle = _cpus[i].loadIdle / _cpus[i].currentTick * 100;
cores[i].loadIrq = _cpus[i].loadIrq / _cpus[i].currentTick * 100;
cores[i].rawLoad = _cpus[i].load;
cores[i].rawLoadUser = _cpus[i].loadUser;
cores[i].rawLoadSystem = _cpus[i].loadSystem;
@ -1564,3 +1564,4 @@ function fullLoad(callback) {
exports.fullLoad = fullLoad;