If your manufacturer sets the proper information, and your motherboard ACPI BIOS supports it, you can use the dmidecode command. For example:
dmidecode > dmidecode.txt
You can then search dmidecode.txt for a Memory Device. For example:
Code:
Handle 0x003C
DMI type 17, 27 bytes.
Memory Device
Array Handle: 0x003A
Error Information Handle: Not Provided
Total Width: 72 bits
Data Width: 64 bits
Size: 512 MB
Form Factor: DIMM
Set: None
Locator: DIMM0
Bank Locator: BANK0
Type: DDR
Type Detail: Synchronous
Speed: 400 MHz (2.5 ns)
Manufacturer: Manufacturer0
Serial Number: SerNum0
Asset Tag: AssetTagNum0
Part Number: PartNum0