diff --git a/CHANGELOG.md b/CHANGELOG.md
index 248bdce..7e1f41f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -83,6 +83,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.
| 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.1 | 2023-08-28 | `graphics()` subVendor fix (linux) |
| 5.21.0 | 2023-08-28 | `graphics()` added subVendor (linux) `memLayout()` DDR5 detection (windows) |
diff --git a/docs/history.html b/docs/history.html
index 9e03ddc..ffb163c 100644
--- a/docs/history.html
+++ b/docs/history.html
@@ -57,6 +57,11 @@
+
+ | 5.21.3 |
+ 2023-08-31 |
+ cpuTemperature() improved parsing for AMD (linux) |
+
| 5.21.2 |
2023-08-30 |
diff --git a/docs/index.html b/docs/index.html
index 7e0befc..1d3d6fb 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -170,7 +170,7 @@
systeminformation
- New Version: 5.21.2
+ New Version: 5.21.3
diff --git a/lib/cpu.js b/lib/cpu.js
index 1df2733..ae2d61c 100644
--- a/lib/cpu.js
+++ b/lib/cpu.js
@@ -1061,16 +1061,23 @@ function cpuTemperature(callback) {
stdout = stdout.substring(tdiePos);
}
let lines = stdout.split('\n');
+ let tctl = 0;
lines.forEach(line => {
const parts = line.split('___');
const label = parts[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')))) {
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;
}
});
+ if (tctl && result.main === null) {
+ result.main = tctl;
+ }
if (result.cores.length > 0) {
if (result.main === null) {