memory() swap used fix (linux)

This commit is contained in:
Sebastian Hildebrandt 2019-04-24 10:19:40 +02:00
parent 3a289a5fe1
commit ce0bc13706
4 changed files with 9 additions and 4 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.1.6 | 2019-04-24 | `memory()` swap used fix (linux) |
| 4.1.5 | 2019-04-19 | refactored `wmic` calls to work also on Windows XP | | 4.1.5 | 2019-04-19 | refactored `wmic` calls to work also on Windows XP |
| 4.1.4 | 2019-03-26 | `networkInterfaces()` speed bug (windows) | | 4.1.4 | 2019-03-26 | `networkInterfaces()` speed bug (windows) |
| 4.1.3 | 2019-03-24 | wmic path detection (windows) | | 4.1.3 | 2019-03-24 | wmic path detection (windows) |

View File

@ -80,6 +80,11 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr>
<th scope="row">4.1.6</th>
<td>2019-04-24</td>
<td><span class="code">memory()</span> swap used fix (linux)</td>
</tr>
<tr> <tr>
<th scope="row">4.1.5</th> <th scope="row">4.1.5</th>
<td>2019-04-19</td> <td>2019-04-19</td>

View File

@ -170,7 +170,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.1.5</span></div> <div class="version">Current Version: <span id="version">4.1.6</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">
@ -201,7 +201,7 @@
<div class="title">Downloads last month</div> <div class="title">Downloads last month</div>
</div> </div>
<div class="col-xl-4 col-lg-4 col-md-4 col-12"> <div class="col-xl-4 col-lg-4 col-md-4 col-12">
<div class="numbers">153</div> <div class="numbers">154</div>
<div class="title">Dependends</div> <div class="title">Dependends</div>
</div> </div>
</div> </div>

View File

@ -152,8 +152,7 @@ function mem(callback) {
result.swaptotal = result.swaptotal ? result.swaptotal * 1024 : 0; result.swaptotal = result.swaptotal ? result.swaptotal * 1024 : 0;
result.swapfree = parseInt(util.getValue(lines, 'swapfree'), 10); result.swapfree = parseInt(util.getValue(lines, 'swapfree'), 10);
result.swapfree = result.swapfree ? result.swapfree * 1024 : 0; result.swapfree = result.swapfree ? result.swapfree * 1024 : 0;
result.swapused = parseInt(util.getValue(lines, 'swapcached'), 10); result.swapused = result.swaptotal - result.swapfree;
result.swapused = result.swapused ? result.swapused * 1024 : 0;
} }
if (callback) { callback(result); } if (callback) { callback(result); }
resolve(result); resolve(result);