Fix for NvidiaCollector when devices are not in MiG mode

This commit is contained in:
Thomas Roehl 2022-07-11 13:05:15 +02:00
parent 04819d9db2
commit addbfd40a1

View File

@ -275,7 +275,7 @@ func readUtilization(device NvidiaCollectorDevice, output chan lp.CCMetric) erro
err := errors.New(nvml.ErrorString(ret))
return err
}
if !isMig {
if isMig {
return nil
}
@ -620,7 +620,7 @@ func readEncUtilization(device NvidiaCollectorDevice, output chan lp.CCMetric) e
err := errors.New(nvml.ErrorString(ret))
return err
}
if !isMig {
if isMig {
return nil
}
if !device.excludeMetrics["nv_encoder_util"] {
@ -647,7 +647,7 @@ func readDecUtilization(device NvidiaCollectorDevice, output chan lp.CCMetric) e
err := errors.New(nvml.ErrorString(ret))
return err
}
if !isMig {
if isMig {
return nil
}
if !device.excludeMetrics["nv_decoder_util"] {