Skip to content

Commit

Permalink
cpuTemperature() fix (linux)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebhildebrandt committed Mar 15, 2021
1 parent 244186e commit 0c700f6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -77,6 +77,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.

| Version | Date | Comment |
| -------------- | -------------- | -------- |
| 5.6.5 | 2021-03-15 | `cpuTemperature()` fix (linux) |
| 5.6.4 | 2021-03-15 | `sanitizeShellString()` and other security improvements |
| 5.6.3 | 2021-03-14 | `sanitizeShellString()` improvement |
| 5.6.2 | 2021-03-10 | `networkInterfaces()` `cpu()` improvement (win) |
Expand Down
5 changes: 5 additions & 0 deletions docs/history.html
Expand Up @@ -56,6 +56,11 @@ <h3>Full version history</h3>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">5.6.5</th>
<td>2021-03-15</td>
<td><span class="code">cpuTemperature()</span> fix linux</td>
</tr>
<tr>
<th scope="row">5.6.4</th>
<td>2021-03-15</td>
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Expand Up @@ -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.6.4</span></div>
<div class="version">New Version: <span id="version">5.6.5</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">
Expand Down
2 changes: 1 addition & 1 deletion lib/cpu.js
Expand Up @@ -937,7 +937,7 @@ function cpuTemperature(callback) {
if (_linux) {
// CPU Chipset, Socket
try {
const cmd = 'cat /sys/class/thermal/thermal_zone*/type; echo "-----"; cat /sys/class/thermal/thermal_zone*/temp;';
const cmd = 'cat /sys/class/thermal/thermal_zone*/type 2>/dev/null; echo "-----"; cat /sys/class/thermal/thermal_zone*/temp 2>/dev/null;';
const parts = execSync(cmd).toString().split('-----\n');
if (parts.length === 2) {
const lines = parts[0].split('\n');
Expand Down

0 comments on commit 0c700f6

Please sign in to comment.