From f93d370116462c9a0f891404eae97b607065ee18 Mon Sep 17 00:00:00 2001 From: Jared Vititoe Date: Fri, 13 Dec 2024 18:44:50 -0500 Subject: [PATCH] Shows if ecc memory is present --- hwmonDaemon.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hwmonDaemon.py b/hwmonDaemon.py index 785638d..68caf6d 100644 --- a/hwmonDaemon.py +++ b/hwmonDaemon.py @@ -109,10 +109,10 @@ class SystemHealthMonitor: logger.info(f"Drive {drive['mountpoint']}: {drive['usage_percent']}% used, SMART: {drive['smart_status']}") logger.info(f"Memory Status: {health_report['memory_health']['status']}") - if health_report['memory_health']['has_ecc']: - logger.info("ECC Memory: Present") - if health_report['memory_health']['ecc_errors']: - logger.info(f"ECC Errors: {health_report['memory_health']['ecc_errors']}") + logger.info(f"Memory Usage: {health_report['memory_health']['memory_percent']}%") + logger.info(f"ECC Memory: {'Present' if health_report['memory_health']['has_ecc'] else 'Not Present'}") + if health_report['memory_health']['has_ecc'] and health_report['memory_health']['ecc_errors']: + logger.info(f"ECC Errors: {health_report['memory_health']['ecc_errors']}") logger.info(f"CPU Usage: {health_report['cpu_health']['cpu_usage_percent']}% ({health_report['cpu_health']['status']})") logger.info(f"Network Management Status: {health_report['network_health']['management_network']['status']}")