systeminformation 5.21.2 → 5.21.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/cpu.js +8 -1
  2. package/package.json +1 -1
package/lib/cpu.js CHANGED
@@ -1061,16 +1061,23 @@ function cpuTemperature(callback) {
1061
1061
  stdout = stdout.substring(tdiePos);
1062
1062
  }
1063
1063
  let lines = stdout.split('\n');
1064
+ let tctl = 0;
1064
1065
  lines.forEach(line => {
1065
1066
  const parts = line.split('___');
1066
1067
  const label = parts[0];
1067
1068
  const value = parts.length > 1 && parts[1] ? parts[1] : '0';
1069
+ if (value && label && label.toLowerCase() === 'tctl') {
1070
+ tctl = result.main = Math.round(parseInt(value, 10) / 100) / 10;
1071
+ }
1068
1072
  if (value && (label === undefined || (label && label.toLowerCase().startsWith('core')))) {
1069
1073
  result.cores.push(Math.round(parseInt(value, 10) / 100) / 10);
1070
- } else if (value && label && result.main === null && (label.toLowerCase().indexOf('package') >= 0 || label.toLowerCase().indexOf('physical') >= 0 || label.toLowerCase() === 'tctl')) {
1074
+ } else if (value && label && result.main === null && (label.toLowerCase().indexOf('package') >= 0 || label.toLowerCase().indexOf('physical') >= 0 || label.toLowerCase() === 'tccd1')) {
1071
1075
  result.main = Math.round(parseInt(value, 10) / 100) / 10;
1072
1076
  }
1073
1077
  });
1078
+ if (tctl && result.main === null) {
1079
+ result.main = tctl;
1080
+ }
1074
1081
 
1075
1082
  if (result.cores.length > 0) {
1076
1083
  if (result.main === null) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "systeminformation",
3
- "version": "5.21.2",
3
+ "version": "5.21.3",
4
4
  "description": "Advanced, lightweight system and OS information library",
5
5
  "license": "MIT",
6
6
  "author": "Sebastian Hildebrandt <hildebrandt@plus-innovations.com> (https://plus-innovations.com)",