diff --git a/plugins/dynamix/include/DashUpdate.php b/plugins/dynamix/include/DashUpdate.php index 774a0cbc2..7c60a54f9 100644 --- a/plugins/dynamix/include/DashUpdate.php +++ b/plugins/dynamix/include/DashUpdate.php @@ -139,7 +139,7 @@ case 'disk': $smart = "state/smart/$name"; $state = exec("hdparm -C ".escapeshellarg("/dev/$port")."|grep -Po 'active|unknown'") ? 'blue-on' : 'blue-blink'; if ($state=='blue-on') my_smart($row7[$n],$name,'New'); - $temp = file_exists($smart) ? exec("awk 'BEGIN{t=\"*\"} \$1==194||\$1==190{t=\$10;exit};\$1==\"Temperature:\"{t=\$2;exit} END{print t}' ".escapeshellarg($smart)) : '*'; + $temp = file_exists($smart) ? exec("awk 'BEGIN{t=\"*\"}\$1==194{t=\$10;exit};\$1==190{t=100-\$10;exit};\$1==\"Temperature:\"{t=\$2;exit} END{print t}' ".escapeshellarg($smart)) : '*'; $heat = exceed($temp,$max,$top) ? 'max' : (exceed($temp,$hot,$top) ? 'hot' : ''); if ($heat) my_insert($row6[$n],""); diff --git a/plugins/dynamix/include/DeviceList.php b/plugins/dynamix/include/DeviceList.php index 4cba0b873..cb3323af4 100644 --- a/plugins/dynamix/include/DeviceList.php +++ b/plugins/dynamix/include/DeviceList.php @@ -271,7 +271,7 @@ function read_disk($name, $part) { $smart = "/var/local/emhttp/smart/$name"; $type = $var['smType'] ?? ''; if (!file_exists($smart) || (time()-filemtime($smart)>=$var['poll_attributes'])) exec("smartctl -n standby -A $type ".escapeshellarg("/dev/$port")." >".escapeshellarg($smart)." &"); - return exec("awk 'BEGIN{t=\"*\"} \$1==194||\$1==190{t=\$10;exit};\$1==\"Temperature:\"{t=\$2;exit} END{print t}' ".escapeshellarg($smart)." 2>/dev/null"); + return exec("awk 'BEGIN{t=\"*\"}\$1==194{t=\$10;exit};\$1==190{t=100-\$10;exit};\$1==\"Temperature:\"{t=\$2;exit} END{print t}' ".escapeshellarg($smart)." 2>/dev/null"); } } function show_totals($text) {