Slot use

_$: dmidecode --type memory

List slots

_$: lshw -class memory

Memory amount

_$: free

Example: Computer with 4GiB of memory formed by 4 slots of 1 GiB each

_$: dmidecode --type memory
# dmidecode 2.11
SMBIOS 2.5 present.

Handle 0x001B, DMI type 16, 15 bytes       # Memory array
Physical Memory Array
	Location: System Board Or Motherboard
	Use: System Memory
	Error Correction Type: None
	Maximum Capacity: 8 GB
	Error Information Handle: Not Provided
	Number Of Devices: 4

Handle 0x001C, DMI type 17, 27 bytes       # Slot 1
Memory Device
	Array Handle: 0x001B
	Error Information Handle: 0xFF01
	Total Width: 40968 bits
	Data Width: 41032 bits
	Size: 1024 MB
	Form Factor: DIMM
	Set: 1
	Locator: DIMM1
	Bank Locator: DIMM 0
	Type: DDR2
	Type Detail: Synchronous
	Speed: 800 MHz
	Manufacturer: Not Specified
	Serial Number: Not Specified
	Asset Tag: Not Specified
	Part Number: Not Specified

Handle 0x001D, DMI type 17, 27 bytes       # Slot 2
Memory Device
	Array Handle: 0x001B
	Error Information Handle: 0xFF01
	Total Width: 41480 bits
	Data Width: 41544 bits
	Size: 1024 MB
	Form Factor: DIMM
	Set: 1
	Locator: DIMM2
	Bank Locator: DIMM 1
	Type: DDR2
	Type Detail: Synchronous
	Speed: 800 MHz
	Manufacturer: Not Specified
	Serial Number: Not Specified
	Asset Tag: Not Specified
	Part Number: Not Specified

Handle 0x001E, DMI type 17, 27 bytes       # Slot 3
Memory Device
	Array Handle: 0x001B
	Error Information Handle: 0xFF01
	Total Width: 41992 bits
	Data Width: 42056 bits
	Size: 1024 MB
	Form Factor: DIMM
	Set: 1
	Locator: DIMM3
	Bank Locator: DIMM 2
	Type: DDR2
	Type Detail: Synchronous
	Speed: 800 MHz
	Manufacturer: Not Specified
	Serial Number: Not Specified
	Asset Tag: Not Specified
	Part Number: Not Specified

Handle 0x001F, DMI type 17, 27 bytes       # Slot 4
Memory Device
	Array Handle: 0x001B
	Error Information Handle: 0xFF01
	Total Width: 42504 bits
	Data Width: 42568 bits
	Size: 1024 MB
	Form Factor: DIMM
	Set: 1
	Locator: DIMM4
	Bank Locator: DIMM 3
	Type: DDR2
	Type Detail: Synchronous
	Speed: 800 MHz
	Manufacturer: Not Specified
	Serial Number: Not Specified
	Asset Tag: Not Specified
	Part Number: Not Specified


_$: lshw -class memory
...
  *-memory
       description: System Memory
       physical id: 1b
       slot: System board or motherboard
       size: 4GiB
     *-bank:0
          description: DIMM DDR2 Synchronous 800 MHz (1.2 ns)
          physical id: 0
          slot: DIMM1
          size: 1GiB
          width: 40968 bits
          clock: 800MHz (1.2ns)
     *-bank:1
          description: DIMM DDR2 Synchronous 800 MHz (1.2 ns)
          physical id: 1
          slot: DIMM2
          size: 1GiB
          width: 41480 bits
          clock: 800MHz (1.2ns)
     *-bank:2
          description: DIMM DDR2 Synchronous 800 MHz (1.2 ns)
          physical id: 2
          slot: DIMM3
          size: 1GiB
          width: 41992 bits
          clock: 800MHz (1.2ns)
     *-bank:3
          description: DIMM DDR2 Synchronous 800 MHz (1.2 ns)
          physical id: 3
          slot: DIMM4
          size: 1GiB
          width: 42504 bits
          clock: 800MHz (1.2ns)

_$: free
             total       used       free     shared    buffers     cached
Mem:       3918744     905032    3013712          0     221176     465696
-/+ buffers/cache:     218160    3700584
Swap:      3905528          0    3905528