A spacecraft's thermal subsystem monitors and regulates the heat within a spacecraft in real time. The thermal subsystem makes sure that waste heat is being rejected from the spacecraft at an adequate rate, makes sure that the batteries remain within their optimal operating temperature and keeps any other temperature-sensitive components within their operating temperatures.
Meseguer, José, Isabel Pérez-Grande, and Angel Sanz-Andrés. Spacecraft thermal control. Elsevier, 2012.