def helper_get_status_list(statusHandle): """ Helper method to get status list from the provided status handle """ errorList = list() errorInfo = dcgm_agent.dcgmStatusPopError(statusHandle) while (errorInfo != None): errorList.append(errorInfo) errorInfo = dcgm_agent.dcgmStatusPopError(statusHandle) return errorList
def helper_investigate_status(statusHandle): """ Helper method to investigate status handle """ errorCount = 0 errorInfo = dcgm_agent.dcgmStatusPopError(statusHandle) while (errorInfo != None): errorCount += 1 print("Error%d" % errorCount) print((" GPU Id: %d" % errorInfo.gpuId)) print((" Field ID: %d" % errorInfo.fieldId)) print((" Error: %d" % errorInfo.status)) errorInfo = dcgm_agent.dcgmStatusPopError(statusHandle)
def UpdateErrors(self): errorCount = dcgm_agent.dcgmStatusGetCount(self.handle) if errorCount < 1: return for i in range(errorCount): self.errors.append(dcgm_agent.dcgmStatusPopError(self.handle))