Como você não mencionou, estou assumindo que isso está no Linux.
dmidecode -t memory
dmidecode -t 16
lshw -class memory
Esqueci quantos módulos de RAM estão instalados no meu laptop. Eu não quero desparafusá-lo, mas quero procurá-lo no console usando o bash. Como faço para reunir essa informação?
Vamos facilitar para os usuários que não usam muito o shell:
sudo dmidecode -t memory | grep -i size
A saída no meu laptop seria:
Size: 2048 MB
Size: 1024 MB
... mostrando que tenho um módulo de 1 GB e um módulo de 2 GB instalado.
No meu caso,
#dmidecode -t 16
informa isso:
Handle 0x000A, DMI type 16, 23 bytes
Physical Memory Array
Location: System Board Or Motherboard
Use: System Memory
Error Correction Type: None
Maximum Capacity: 16 GB
Error Information Handle: Not Provided
Number Of Devices: 2
Gostaria de salientar que tenho apenas 4 GiB de RAM em um módulo. Essa informação é mostrada ao fazer:
# dmidecode -t 17
isto é mostrado:
# dmidecode 2.11
SMBIOS 2.7 present.
Handle 0x000B, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x000A
Error Information Handle: Not Provided
Total Width: Unknown
Data Width: Unknown
Size: No Module Installed
Form Factor: DIMM
Set: None
Locator: ChannelA-DIMM0
Bank Locator: BANK 0
Type: Unknown
Type Detail: None
Speed: Unknown
Manufacturer: Not Specified
Serial Number: Not Specified
Asset Tag: None
Part Number: Not Specified
Rank: Unknown
Configured Clock Speed: Unknown
Handle 0x000C, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x000A
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 4096 MB
Form Factor: SODIMM
Set: None
Locator: ChannelB-DIMM0
Bank Locator: BANK 2
Type: DDR3
Type Detail: Synchronous
Speed: 1600 MHz
Manufacturer: Hynix/Hyundai
Serial Number: 11111111
Asset Tag: None
Part Number: HMT351S6CFR8C-PB
Rank: Unknown
Configured Clock Speed: 1600 MHz
E, como você pode ver, o banco 2 está cheio e o banco 0 está vazio. A placa tem apenas dois slots para RAM, mas eles precisam ser de canal duplo.
Embora o OP prefira evitar o desaparafusamento para inspecionar fisicamente, eu sugiro strongmente que todos façam exatamente isso, já que a resposta das sondas de linha de comando pode ser enganosa. No meu laptop, as sondas de linha de comando dizem que eu tenho 4 slots (2 usados, 2 vazios), mas ao desparafusar eu tenho 2 slots (talvez eu tenha 2 slots escondidos em outros lugares ainda não visíveis removendo o painel inferior):
sudo dmidecode | grep -A 9 "System Information"
System Information
Manufacturer: Micro-Star International Co., Ltd.
Product Name: CX61 0NC/CX61 0ND/CX61 0NF/CX61 0NE
Version: REV:1.0
Serial Number: FFFFFFFF
UUID: 03000200-0400-0500-0006-000700080009
Wake-up Type: Power Switch
SKU Number: To be filled by O.E.M.
Family: To be filled by O.E.M.
# -------
sudo dmidecode -t 16
# dmidecode 2.12
SMBIOS 2.7 present.
Handle 0x0024, DMI type 16, 23 bytes
Physical Memory Array
Location: System Board Or Motherboard
Use: System Memory
Error Correction Type: None
Maximum Capacity: 32 GB
Error Information Handle: Not Provided
Number Of Devices: 4
# -------
sudo dmidecode -t 17
# dmidecode 2.12
SMBIOS 2.7 present.
Handle 0x0025, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x0024
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 4096 MB
Form Factor: SODIMM
Set: None
Locator: ChannelA-DIMM0
Bank Locator: BANK 0
Type: DDR3
Type Detail: Synchronous
Speed: 1600 MHz
Manufacturer: 830B
Serial Number: 91D82E7B
Asset Tag: 9876543210
Part Number: M2S4G64CB8HG4N-DI
Rank: 2
Configured Clock Speed: 1600 MHz
Handle 0x0027, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x0024
Error Information Handle: Not Provided
Total Width: Unknown
Data Width: Unknown
Size: No Module Installed
Form Factor: DIMM
Set: None
Locator: ChannelA-DIMM1
Bank Locator: BANK 1
Type: Unknown
Type Detail: None
Speed: Unknown
Manufacturer: [Empty]
Serial Number: [Empty]
Asset Tag: 9876543210
Part Number: [Empty]
Rank: Unknown
Configured Clock Speed: Unknown
Handle 0x0028, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x0024
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 4096 MB
Form Factor: SODIMM
Set: None
Locator: ChannelB-DIMM0
Bank Locator: BANK 2
Type: DDR3
Type Detail: Synchronous
Speed: 1600 MHz
Manufacturer: 830B
Serial Number: 20DC2E7C
Asset Tag: 9876543210
Part Number: M2S4G64CB8HG4N-DI
Rank: 2
Configured Clock Speed: 1600 MHz
Handle 0x002A, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x0024
Error Information Handle: Not Provided
Total Width: Unknown
Data Width: Unknown
Size: No Module Installed
Form Factor: DIMM
Set: None
Locator: ChannelB-DIMM1
Bank Locator: BANK 3
Type: Unknown
Type Detail: None
Speed: Unknown
Manufacturer: [Empty]
Serial Number: [Empty]
Asset Tag: 9876543210
Part Number: [Empty]
Rank: Unknown
Configured Clock Speed: Unknown
ubuntu 14.04
Isso facilita a visualização do que você precisa saber (linhas vazias inseridas para maior clareza):
$ sudo dmidecode -t memory | grep -iE "Size|Type:|Speed"
Error Correction Type: None
Size: No Module Installed
Type: Unknown
Speed: Unknown
Configured Clock Speed: Unknown
Size: 4096 MB
Type: DDR3
Speed: 1600 MHz
Configured Clock Speed: 1600 MHz
Size: No Module Installed
Type: Unknown
Speed: Unknown
Configured Clock Speed: Unknown
Size: 4096 MB
Type: DDR3
Speed: 1600 MHz
Configured Clock Speed: 1600 MHz
Tags command-line hardware memory linux