cpu() Handle RISC-V CPU Manufacturer and Brand

This commit is contained in:
Sebastian Hildebrandt 2024-12-23 10:26:28 +01:00
parent a943c1df16
commit 778c179dc2
4 changed files with 13 additions and 3 deletions

View File

@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.
| Version | Date | Comment |
| ------- | ---------- | --------------------------------------------------------------------------------------------------- |
| 5.23.18 | 2024-12-24 | `cpu()` Handle RISC-V CPU Manufacturer and Brand |
| 5.23.17 | 2024-12-23 | `wifiConnections()` refactored - Sequoia compatibel (macOS) |
| 5.23.16 | 2024-12-22 | `networkConnections()` refactored PID parsing (macOS) |
| 5.23.15 | 2024-12-21 | `users()`, `wifiNetworks()` fixed parsing (macOS Seguoia) |

View File

@ -57,6 +57,12 @@
</tr>
</thead>
<tbody>
<tr>
<th scope="row">5.23.18</th>
<td>2024-12-24</td>
<td><span class="code">cpu()</span> Handle RISC-V CPU Manufacturer and Brand</td>
</tr>
<tr>
<th scope="row">5.23.17</th>
<td>2024-12-23</td>

View File

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

@ -1544,8 +1544,11 @@ function networkConnections(callback) {
processes = processes.map((line => { return line.trim().replace(/ +/g, ' '); }));
let lines = stdout.toString().split('\n');
lines.shift();
const header = lines.shift().replace(/ Address/g, '_Address').replace(/ +/g, ' ').split(' ');
let pidPos = header.indexOf('pid');
let pidPos = 8;
if (lines.length > 1 && lines[0].indexOf('pid') > 0) {
const header = (lines.shift() || '').replace(/ Address/g, '_Address').replace(/ +/g, ' ').split(' ');
pidPos = header.indexOf('pid');
}
lines.forEach(function (line) {
line = line.replace(/ +/g, ' ').split(' ');
if (line.length >= 8) {