Changed GPU naming scheme

This commit is contained in:
Kraust 2019-07-14 10:44:03 -04:00
parent 7b2f16a48c
commit 42e65038b0

View File

@ -61,7 +61,7 @@ func collectNvidiaSensors() []sensorMeasurement {
for i := range info.GPUS { for i := range info.GPUS {
gpu := info.GPUS[i] gpu := info.GPUS[i]
var s sensorMeasurement var s sensorMeasurement
s.name = strings.ReplaceAll(strings.ToLower(gpu.ProductName), " ", "_") + "_" + strconv.Itoa(i) + "_input" s.name = gpu.ProductName + " " + strconv.Itoa(i)
s.temperature, _ = strconv.ParseFloat(strings.ReplaceAll(gpu.GpuTemp, " C", ""), 10) s.temperature, _ = strconv.ParseFloat(strings.ReplaceAll(gpu.GpuTemp, " C", ""), 10)
measurements = append(measurements, s) measurements = append(measurements, s)
} }