Updated ecc logic, added RAM configured speed #17

Merged
PeterSurda merged 1 commits from swapnil/idlers-agent:main into main 2024-06-27 00:57:58 +02:00
Showing only changes of commit 8f79919659 - Show all commits

View File

@ -184,10 +184,13 @@ class ServerData:
for ram in ram_info: for ram in ram_info:
size = ram.get('Size', 'Unknown') size = ram.get('Size', 'Unknown')
speed = ram.get('Speed', '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') serial_number = ram.get('Serial Number', 'Unknown')
ram_type = ram.get('Type', '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( note = "Chassis Model: {} | Serial Number: {} ||| Processor Model: {} | Count: {} ||| RAM Details: {}".format(
chassis_model, chassis_serial, processor_model, processor_count, ' | '.join(ram_details)) chassis_model, chassis_serial, processor_model, processor_count, ' | '.join(ram_details))