processes() fix alpine linux

This commit is contained in:
Sebastian Hildebrandt 2021-09-01 00:51:24 +02:00
parent 20686814b0
commit 9edbb44308
5 changed files with 10 additions and 4 deletions

View File

@ -77,6 +77,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.
| Version | Date | Comment |
| -------------- | -------------- | -------- |
| 5.8.7 | 2021-09-01 | `processes()` fix alpine linux |
| 5.8.6 | 2021-08-26 | `cpu()` improved detection (win) |
| 5.8.5 | 2021-08-26 | `osInfo()` hyper-v detection fix (win VM) |
| 5.8.4 | 2021-08-26 | `graphics()` added vendor (macOS) |

View File

@ -30,7 +30,7 @@
[![Sponsoring][sponsor-badge]][sponsor-url]
[![MIT license][license-img]][license-url]
This is amazing. Started as a small project just for myself, it now has > 10,000 lines of code, > 400 versions published, up to 3 mio downloads per month, > 40 mio downloads overall. Thank you to all who contributed to this project!
This is amazing. Started as a small project just for myself, it now has > 10,000 lines of code, > 400 versions published, up to 3 mio downloads per month, > 45 mio downloads overall. Thank you to all who contributed to this project!
## New Version 5.0

View File

@ -56,6 +56,11 @@
</tr>
</thead>
<tbody>
<tr>
<th scope="row">5.8.7</th>
<td>2021-09-01</td>
<td><span class="code">processes()</span> fix alpine linux</td>
</tr>
<tr>
<th scope="row">5.8.6</th>
<td>2021-08-26</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.8.6</span></div>
<div class="version">New Version: <span id="version">5.8.7</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">
@ -211,7 +211,7 @@
<div class="title">Downloads last month</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-12">
<div class="numbers">465</div>
<div class="numbers">469</div>
<div class="title">Dependents</div>
</div>
</div>

View File

@ -689,7 +689,7 @@ function processes(callback) {
if (_darwin) { cmd = 'export LC_ALL=C; ps -axo pid,ppid,pcpu,pmem,pri,vsz,rss,nice,lstart,state,tty,user,command -r; unset LC_ALL'; }
if (_sunos) { cmd = 'ps -Ao pid,ppid,pcpu,pmem,pri,vsz,rss,nice,stime,s,tty,user,comm'; }
exec(cmd, { maxBuffer: 1024 * 20000 }, function (error, stdout) {
if (!error) {
if (!error && stdout.toString().trim()) {
result.list = (parseProcesses(stdout.toString().split('\n'))).slice();
result.all = result.list.length;
result.running = result.list.filter(function (e) {