mirror of
https://github.com/unraid/webgui.git
synced 2026-04-24 11:19:25 -05:00
Set temperature thresholds for SSD devices automatically higher
- Add 15 degrees extra for SSD devices as standard 'hot' and 'max' thresholds - User can overwrite defaults by setting thresholds for a specific device
This commit is contained in:
@@ -59,8 +59,8 @@ case "attributes":
|
||||
$events = explode('|',get_value($disk,'smEvents',$numbers));
|
||||
extract(parse_plugin_cfg('dynamix',true));
|
||||
[$hotNVME,$maxNVME] = _var($disk,'transport')=='nvme' ? get_nvme_info(_var($disk,'device'),'temp') : [-1,-1];
|
||||
$hot = _var($disk,'hotTemp',-1)>=0 ? $disk['hotTemp'] : ($hotNVME>=0 ? $hotNVME : (_var($display,'hot',-1)>=0 ? $display['hot'] : 0));
|
||||
$max = _var($disk,'maxTemp',-1)>=0 ? $disk['maxTemp'] : ($maxNVME>=0 ? $maxNVME : (_var($display,'max',-1)>=0 ? $display['max'] : 0));
|
||||
$hot = _var($disk,'hotTemp',-1)>=0 ? $disk['hotTemp'] : ($hotNVME>=0 ? $hotNVME : (_var($disk,'rotational',1)==0 ? ($display['hot']>0 ? $display['hot']+15 : 0) : $display['hot']));
|
||||
$max = _var($disk,'maxTemp',-1)>=0 ? $disk['maxTemp'] : ($maxNVME>=0 ? $maxNVME : (_var($disk,'rotational',1)==0 ? ($display['max']>0 ? $display['max']+15 : 0) : $display['max']));
|
||||
$top = $_POST['top'] ?? 120;
|
||||
$empty = true;
|
||||
exec("smartctl -n standby -A $type ".escapeshellarg("/dev/$port"),$output);
|
||||
|
||||
Reference in New Issue
Block a user