Coarser check for missing return values of nvidia-smi.

N/A and [N/A] are already discovered. Maybe we encounter more versions in the future.
This commit is contained in:
Andreas Bachlechner 2022-03-20 11:24:31 +01:00
parent 3893da5072
commit e953ed7824
1 changed files with 1 additions and 1 deletions

View File

@ -191,7 +191,7 @@ sub nvidiagpu_update {
if(scalar(@tmp) > 1) { # To catch missing devices
for(my $n_sensor = 0; $n_sensor < scalar(@tmp); $n_sensor += 1) {
my $val = trim($tmp[$n_sensor]);
if($val ne "N/A") {
if($val !~ /N\/A/) {
if(substr($val, 0, 1) eq "P") {
$val = substr($val, 1);
}