Search Google

Friday, April 25, 2008

Check ram type in Linux

我們在Linux中雖然可以透過dmesg以及/proc獲取許多主機的硬體資訊,例如CPU,記憶體容量等資訊,但是卻無法得知主機採用何種記憶體,這對於想要替主機擴增記憶體的管理者來說頗不方便,因此"dmidecode"指令便在此時派上用場。
使用"dmidecode"指令就可以在console下得知主機記憶體的類別(SDRAM,DDR,DDR2等),以下為執行"dmidecode"所取得的部分訊息,其說明主機上使用的是兩條256MB的SDRAM:

Handle 0x0006, DMI type 6, 12 bytes
Memory Module Information
Socket Designation: DIMM 1
Bank Connections: 0 1
Current Speed: Unknown
Type: DIMM SDRAM
Installed Size: 256 MB (Double-bank Connection)
Enabled Size: 256 MB (Double-bank Connection)

Error Status: OK

Handle 0x0007, DMI type 6, 12 bytes
Memory Module Information
Socket Designation: DIMM 2
Bank Connections: 2 3
Current Speed: Unknown
Type: DIMM SDRAM
Installed Size: 256 MB (Double-bank Connection)
Enabled Size: 256 MB (Double-bank Connection)

Error Status: OK

No comments: