Skip to content

Commit

Permalink
Fix to support more fancy sensor command outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
iliajie committed May 16, 2021
1 parent 8865993 commit 7fe97a7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion proc/linux-lib.pl
Expand Up @@ -523,7 +523,10 @@ sub get_current_cpu_temps
/in[\d+]:\s+[\+\-0-9\.]+\s+V/i);

# Get odd output like in #1253
if ($aa && /temp(\d+):\s+([\+\-][0-9\.]+)\s+.*?[=+].*?\)/) {
if ($aa && (
/temp(\d+):\s+([\+\-][0-9\.]+)\s+.*?[=+].*?\)/ ||
/temp(\d+):\s+([\+\-][0-9\.]+).*?°[Cc]\s+.*?[=+].*?\)/
)) {
# Adjust to start from `0` as all other outputs
push(@rvx, { 'core' => (int($1) - 1),
'temp' => $2 });
Expand Down

1 comment on commit 7fe97a7

@iliajie
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add ref.: #1484 (comment)

Please sign in to comment.