import psutil
def monitor_ssd_cooling():
# 获取CPU温度
cpu_temp = psutil.sensors_temperatures()['coretemp'][0].current
# 获取SSD温度
ssd_temp = psutil.sensors_temperatures()['nvme'][0].current
# 判断是否超过阈值
if cpu_temp > 80 or ssd_temp > 60:
print("Warning: CPU or SSD temperature is too high!")
else:
print("CPU and SSD temperatures are normal.")
if __name__ == '__main__':
monitor_ssd_cooling()
python实现监控SSD盘散热模块
最新推荐文章于 2024-08-15 01:55:01 发布