Added note and refactor code #16
No reviewers
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Sysdeploy/idlers-agent#16
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "swapnil/idlers-agent:main"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
mainto Added note and refactor codeI'll merge it because the comments I have can be done in next iteration.
@ -164,0 +169,4 @@
if section['DMIType'] == 1:
chassis_info = section
break
if chassis_info:
We should also report "baseboard", and "system", if present. Traditional servers seem to report "system" and/or "chassis" whereas custom build machines report only "baseboard" (i.e. motherboard), as there is no way for the motherboard to find out what kind of chassis it is mounted into.
Please share a sample
sudo dmidecode -t1
output.Here's what I see on test2:
one:
two:
@ -164,0 +177,4 @@
processor_info = [section for section in self.dmidecode_data if section['DMIType'] == 4]
processor_model = processor_info[0].get('Version', 'Unknown') if processor_info else 'Unknown'
processor_count = len(processor_info)
I need to verify how it works if there are multiple processors. I have a couple of dual-socket systems, but they always have the same processor model.
Even this part of the code assumes multiple sections with
'DMIType'
4. But only gets'Version'
from the first section. Since you've said "they always have the same processor model", I assume this code should be fine.Yes looks like it's ok.
@ -164,0 +184,4 @@
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'
I was looking at some systems, and sometimes both TotalWidth and DataWidth is 72. I'm not really sure what it means. I vaguely remember reading that that's a bug in some DDR4 modules or motherboards. For now I would only check for TotalWidth and ignore DataWidth.
I did some reading on this. TotalWidth is DataWidth + (any extra bits for error correction). So it doesn't matter what the exact number of the TotalWidth is, at least in theory. However, common configuration for ECC memory is to have TotalWidth of 72 bits and a DataWidth of 64, giving extra 8 bits for error checking.
TLDR; to determine if a memory module is ECC or non-ECC, we should compare TotalWidth and DataWidth.
if TotalWidth > DataWidth: true else false
.It misreports on some DDR4 systems and I haven't found conclusive clarification. I have one system for example which reports TotalWidth 72 and DataWidth 72. But it doesn't influence the amount of available memory.
@ -164,0 +187,4 @@
ecc = 'Yes' if ram.get('Total Width') == '72 bits' and ram.get('Data Width') == '64 bits' 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))
There are actually two speeds reported, one is the specification of the module and the other is configured speed. What you could do, is to report them both separated with "@". E.g. "1866@1333MHz".
Example output:
So "Speed" will be "1600 MT/s @ 1600 MT/s" ?
Yes.