Fix format in nvidiagpu.pm for better readability.

This commit is contained in:
Andreas Bachlechner 2021-12-10 12:19:02 +01:00
parent 2b4569f9e7
commit 8e89baa6f4
1 changed files with 2 additions and 4 deletions

View File

@ -213,8 +213,7 @@ sub nvidiagpu_update {
# nvidiagpu alert
if(lc($nvidiagpu->{alerts}->{coretemp_enabled}) eq "y") {
my $sensorIndex = 1;
$config->{nvidiagpu_hist_alert1}->{$n} = 0
if(!$config->{nvidiagpu_hist_alert1}->{$n});
$config->{nvidiagpu_hist_alert1}->{$n} = 0 if(!$config->{nvidiagpu_hist_alert1}->{$n});
if($sensors[$sensorIndex] >= $nvidiagpu->{alerts}->{coretemp_threshold} && $config->{nvidiagpu_hist_alert1}->{$n} < $sensors[$sensorIndex]) {
if(-x $nvidiagpu->{alerts}->{coretemp_script}) {
logger("$myself: ALERT: executing script '$nvidiagpu->{alerts}->{coretemp_script}'.");
@ -227,8 +226,7 @@ sub nvidiagpu_update {
}
if(lc($nvidiagpu->{alerts}->{memorytemp_enabled}) eq "y") {
my $sensorIndex = 2;
$config->{nvidiagpu_hist_alert2}->{$n} = 0
if(!$config->{nvidiagpu_hist_alert2}->{$n});
$config->{nvidiagpu_hist_alert2}->{$n} = 0 if(!$config->{nvidiagpu_hist_alert2}->{$n});
if($sensors[$sensorIndex] >= $nvidiagpu->{alerts}->{memorytemp_threshold} && $config->{nvidiagpu_hist_alert2}->{$n} < $sensors[$sensorIndex]) {
if(-x $nvidiagpu->{alerts}->{memorytemp_script}) {
logger("$myself: ALERT: executing script '$nvidiagpu->{alerts}->{memorytemp_script}'.");