From 6c7e8b8fe4eaeb88ba90aaff84cadbaaaeba3c0d Mon Sep 17 00:00:00 2001 From: Jared Vititoe Date: Mon, 3 Mar 2025 20:28:22 -0500 Subject: [PATCH] Debug nvme temp --- hwmonDaemon.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/hwmonDaemon.py b/hwmonDaemon.py index 488534e..27fb2ec 100644 --- a/hwmonDaemon.py +++ b/hwmonDaemon.py @@ -840,14 +840,20 @@ class SystemHealthMonitor: stderr=subprocess.PIPE, text=True ) + logger.debug(f"NVMe smart-log raw output for {device}:") + logger.debug(nvme_result.stdout) + for line in nvme_result.stdout.split('\n'): if 'temperature' in line.lower(): - # Extract only the numeric temperature value temp_str = line.split(':')[1].strip() - temp_value = int(''.join(c for c in temp_str if c.isdigit())[0:2]) - smart_health['temp'] = temp_value + logger.debug(f"Raw temperature string: {temp_str}") + + temp_value = int(''.join(c for c in temp_str if c.isdigit())[0:2]) + logger.debug(f"Parsed temperature value: {temp_value}") + + smart_health['temp'] = temp_value + logger.debug(f"Final temperature recorded: {smart_health['temp']}") - # Update temperature thresholds if temp_value >= SMART_THRESHOLDS['Temperature_Celsius']['critical']: smart_health['severity'] = 'CRITICAL' smart_health['issues'].append(f"Critical temperature: {temp_value}°C")