cpuTemperature() improved parsing for AMD (linux)
This commit is contained in:
parent
ce7ad7ec1c
commit
8e84cf4f58
@ -83,6 +83,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.
|
|||||||
|
|
||||||
| Version | Date | Comment |
|
| Version | Date | Comment |
|
||||||
| ------- | ---------- | --------------------------------------------------------------------------------------------------- |
|
| ------- | ---------- | --------------------------------------------------------------------------------------------------- |
|
||||||
|
| 5.21.3 | 2023-08-31 | `cpuTemperature()` improved parsing for AMD (linux) |
|
||||||
| 5.21.2 | 2023-08-30 | `cpuTemperature()` improved parsing for AMD (linux) |
|
| 5.21.2 | 2023-08-30 | `cpuTemperature()` improved parsing for AMD (linux) |
|
||||||
| 5.21.1 | 2023-08-28 | `graphics()` subVendor fix (linux) |
|
| 5.21.1 | 2023-08-28 | `graphics()` subVendor fix (linux) |
|
||||||
| 5.21.0 | 2023-08-28 | `graphics()` added subVendor (linux) `memLayout()` DDR5 detection (windows) |
|
| 5.21.0 | 2023-08-28 | `graphics()` added subVendor (linux) `memLayout()` DDR5 detection (windows) |
|
||||||
|
|||||||
@ -57,6 +57,11 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">5.21.3</th>
|
||||||
|
<td>2023-08-31</td>
|
||||||
|
<td><span class="code">cpuTemperature()</span> improved parsing for AMD (linux)</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">5.21.2</th>
|
<th scope="row">5.21.2</th>
|
||||||
<td>2023-08-30</td>
|
<td>2023-08-30</td>
|
||||||
|
|||||||
@ -170,7 +170,7 @@
|
|||||||
<img class="logo" src="assets/logo.png" alt="logo">
|
<img class="logo" src="assets/logo.png" alt="logo">
|
||||||
<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">New Version: <span id="version">5.21.2</span></div>
|
<div class="version">New Version: <span id="version">5.21.3</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">
|
||||||
|
|||||||
@ -1061,16 +1061,23 @@ function cpuTemperature(callback) {
|
|||||||
stdout = stdout.substring(tdiePos);
|
stdout = stdout.substring(tdiePos);
|
||||||
}
|
}
|
||||||
let lines = stdout.split('\n');
|
let lines = stdout.split('\n');
|
||||||
|
let tctl = 0;
|
||||||
lines.forEach(line => {
|
lines.forEach(line => {
|
||||||
const parts = line.split('___');
|
const parts = line.split('___');
|
||||||
const label = parts[0];
|
const label = parts[0];
|
||||||
const value = parts.length > 1 && parts[1] ? parts[1] : '0';
|
const value = parts.length > 1 && parts[1] ? parts[1] : '0';
|
||||||
|
if (value && label && label.toLowerCase() === 'tctl') {
|
||||||
|
tctl = result.main = Math.round(parseInt(value, 10) / 100) / 10;
|
||||||
|
}
|
||||||
if (value && (label === undefined || (label && label.toLowerCase().startsWith('core')))) {
|
if (value && (label === undefined || (label && label.toLowerCase().startsWith('core')))) {
|
||||||
result.cores.push(Math.round(parseInt(value, 10) / 100) / 10);
|
result.cores.push(Math.round(parseInt(value, 10) / 100) / 10);
|
||||||
} else if (value && label && result.main === null && (label.toLowerCase().indexOf('package') >= 0 || label.toLowerCase().indexOf('physical') >= 0 || label.toLowerCase() === 'tctl')) {
|
} else if (value && label && result.main === null && (label.toLowerCase().indexOf('package') >= 0 || label.toLowerCase().indexOf('physical') >= 0 || label.toLowerCase() === 'tccd1')) {
|
||||||
result.main = Math.round(parseInt(value, 10) / 100) / 10;
|
result.main = Math.round(parseInt(value, 10) / 100) / 10;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if (tctl && result.main === null) {
|
||||||
|
result.main = tctl;
|
||||||
|
}
|
||||||
|
|
||||||
if (result.cores.length > 0) {
|
if (result.cores.length > 0) {
|
||||||
if (result.main === null) {
|
if (result.main === null) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user