From a2f88e1d1a9095e9eea17c9532c8c1deb91b51f4 Mon Sep 17 00:00:00 2001 From: Ilia Rostovtsev Date: Mon, 10 Aug 2020 22:43:45 +0300 Subject: [PATCH] Fix to accommodate Raspberry Pi sensors output #1280 --- proc/linux-lib.pl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/proc/linux-lib.pl b/proc/linux-lib.pl index a840ce894..845f2a3b0 100755 --- a/proc/linux-lib.pl +++ b/proc/linux-lib.pl @@ -512,9 +512,10 @@ if (&has_command("sensors")) { $a = 0 if (/^\s*$/); # Device has either fan or voltage data (sign of CPU) $a = 1 if (/fan[\d+]:\s+[0-9]+\s+RPM/i || - /in[\d+]:\s+[\+\-0-9\.]+\s+V/i); - # Get odd output like in #1253 - if ($a && /temp(\d+):\s+([\+\-][0-9\.]+)\s+.*?[=+].*?\)/) { + /in[\d+]:\s+[\+\-0-9\.]+\s+V/i || + /cpu_thermal-virtual-[\d]+/i); + # Get odd output like in #1253 #1280 + if ($a && /temp(\d+):\s+([\+\-][0-9\.]+)/) { # Adjust to start from `0` as all other outputs push(@rv, { 'core' => (int($1) - 1), 'temp' => $2 });