mirror of
https://github.com/unraid/webgui.git
synced 2026-04-26 12:20:42 -05:00
awk 'BEGIN{s=t=\"*\"}\$1==190{s=\$10};\$1==194{t=\$10;exit};\$1==\"Temperature:\"{t=\$2;exit};/^Current Drive Temperature:/{t=$4;exit} END{i
This commit is contained in:
@@ -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{s=t=\"*\"}\$1==190{s=\$10};\$1==194{t=\$10;exit};\$1==\"Temperature:\"{t=\$2;exit};/^Current Drive Temperature:/{t=$4;exit} END{if(t!=\"*\")print t; else print s}' ".escapeshellarg($smart)." 2>/dev/null");
|
||||
return exec("awk 'BEGIN{s=t=\"*\"}\$1==190{s=\$10};\$1==194{t=\$10;exit};\$1==\"Temperature:\"{t=\$2;exit};/^Current Drive Temperature:/{t=\$4;exit} END{if(t!=\"*\")print t; else print s}' ".escapeshellarg($smart)." 2>/dev/null");
|
||||
}
|
||||
}
|
||||
function show_totals($text) {
|
||||
|
||||
Reference in New Issue
Block a user