diff --git a/sonic-thermalctld/scripts/thermalctld b/sonic-thermalctld/scripts/thermalctld index f9b8ff73e..86f07dbbf 100644 --- a/sonic-thermalctld/scripts/thermalctld +++ b/sonic-thermalctld/scripts/thermalctld @@ -566,7 +566,6 @@ class TemperatureUpdater(logger.Logger): :return: """ self.log_debug("Start temperature updating") - available_thermals = set() for index, thermal in enumerate(self.chassis.get_all_thermals()): if self.task_stopping_event.is_set(): @@ -593,6 +592,7 @@ class TemperatureUpdater(logger.Logger): available_thermals.add((thermal, parent_name, thermal_index)) self._refresh_temperature_status(parent_name, thermal, thermal_index) + if self.is_chassis_system: for module_index, module in enumerate(self.chassis.get_all_modules()): module_name = try_get(module.get_name, 'Module {}'.format(module_index + 1)) @@ -612,7 +612,7 @@ class TemperatureUpdater(logger.Logger): available_thermals.add((thermal, sfp_name, thermal_index)) self._refresh_temperature_status(sfp_name, thermal, thermal_index) - + for psu_index, psu in enumerate(module.get_all_psus()): if psu.get_presence() and psu.get_powergood_status(): psu_name = '{} PSU {}'.format(module_name, psu_index + 1)