From 8f799196591c103dfee596e9e55af9d2990dcc6b Mon Sep 17 00:00:00 2001 From: Swapnil Date: Wed, 26 Jun 2024 15:45:03 +0530 Subject: [PATCH] Updated ecc logic, added RAM configured speed --- agent.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/agent.py b/agent.py index 52a60f8..46040bf 100644 --- a/agent.py +++ b/agent.py @@ -184,10 +184,13 @@ class ServerData: for ram in ram_info: size = ram.get('Size', 'Unknown') speed = ram.get('Speed', 'Unknown') - ecc = 'Yes' if ram.get('Total Width') == '72 bits' and ram.get('Data Width') == '64 bits' else 'No' + configured_speed = ram.get('Configured Memory Speed', 'Unknown') + total_width = int(ram.get('Total Width', "0").split()[0]) + data_width = int(ram.get('Data Width', "0").split()[0]) + ecc = 'Yes' if total_width > data_width else 'No' serial_number = ram.get('Serial Number', 'Unknown') ram_type = ram.get('Type', 'Unknown') - ram_details.append("Size: {}, Speed: {}, ECC: {}, Serial Number: {}, Type: {}".format(size, speed, ecc, serial_number, ram_type)) + ram_details.append("Size: {}, Speed: {} @ {}, ECC: {}, Serial Number: {}, Type: {}".format(size, speed, configured_speed, ecc, serial_number, ram_type)) note = "Chassis Model: {} | Serial Number: {} ||| Processor Model: {} | Count: {} ||| RAM Details: {}".format( chassis_model, chassis_serial, processor_model, processor_count, ' | '.join(ram_details)) -- 2.45.1