in src/worker/exporters/nvidia_exporter.py [0:0]
def CustomDataHandler(self, fvs):
global dcgm_config
for gpuId in fvs.keys():
gpuUuid = self.m_gpuIdToUUId[gpuId]
gpuBusId = self.m_gpuIdToBusId[gpuId]
gpuUniqueId = gpuUuid if dcgm_config['sendUuid'] else gpuBusId
gpu_line = [str(gpuId), gpuUniqueId]
for fieldId in self.m_publishFields[self.m_updateFreq]:
if fieldId in self.m_dcgmIgnoreFields:
continue
val = fvs[gpuId][fieldId][-1]
if val.isBlank:
continue
dcgm_config['last_value'][gpuId][fieldId] = val
self.m_gauges[fieldId].labels(
gpuId,
gpuUniqueId,
dcgm_config['jobId']
).set(val.value)
gpu_line.append(str(val.value))
logging.debug('Sent GPU %d %s : %s=%s', gpuId,
gpuUniqueId, self.m_fieldIdToInfo[fieldId].tag,
str(val.value))
logging.debug(','.join(gpu_line))