2021-05-12 14:32:11
Linux系統入門教學:如何找出你的系統所支援的最大記憶體
2020-06-16 18:03:37
大多數情況下你可以從BIOS、產品目錄或者乾脆手動找出你的系統所持的最大記憶體。這裡,我們介紹一種簡單有用的技巧——使用dmidecode來找出系統支援的最大記憶體,這樣你就無需開啟機箱或者參照BIOS和產品目錄了。
什麼是 dmidecode?
就像你可能知道的一樣, dmidecode是一個將計算機DMI(又名SMBIOS)表的內容轉換為可讀格式的工具。這個表包含了系統硬體元件的介紹以及其他一些如序列號和IOS版本等有用的資訊。使用dmidecode你能夠獲取此項資訊,而無需去探測真實的硬體。
找出你的系統所支援的最大記憶體
請確定你已經在系統中安裝了dmidecode,我覺得你的作業系統應該已經自動安裝過了,不過並不非常確定。
在基於Deb的系統中安裝
sudo apt-get install dmidecode
在基於RPM的系統中安裝
sudo yum install dmidecode
在SUSE/openSUSE中安裝
sudo zypper in dmidecode
好了,我們已經安裝了dmidecode,接下來讓我們找出支援的最大記憶體。輸入以下命令:
sudo dmidecode -t 16
輸出樣本
# dmidecode 2.12
SMBIOS 2.6 present.
Handle0x0014, DMI type 16,15 bytes
PhysicalMemoryArray
Location:SystemBoardOrMotherboard
Use:SystemMemory
ErrorCorrectionType:None
MaximumCapacity:16 GB
ErrorInformationHandle:NotProvided
NumberOfDevices:2
就像你看到的,我的系統支援最大記憶體到16G,並且有兩個記憶體插槽,簡單吧?
接下來,讓我們找出現在已經安裝的記憶體的詳細資訊。
sudo dmidecode -t 17
輸出樣本
# dmidecode 2.12
SMBIOS 2.6 present.
Handle0x0017, DMI type 17,28 bytes
MemoryDevice
ArrayHandle:0x0014
ErrorInformationHandle:0x0000
TotalWidth:Unknown
DataWidth:Unknown
Size:NoModuleInstalled
FormFactor: DIMM
Set:None
Locator: DIMM_B
BankLocator: BANK 2
Type:Unknown
TypeDetail:None
Speed:Unknown
Manufacturer:NotSpecified
SerialNumber:NotSpecified
AssetTag:NotSpecified
PartNumber:NotSpecified
Rank:Unknown
Handle0x0015, DMI type 17,28 bytes
MemoryDevice
ArrayHandle:0x0014
ErrorInformationHandle:0x0000
TotalWidth:64 bits
DataWidth:64 bits
Size:4096 MB
FormFactor: SODIMM
Set:None
Locator: DIMM_A
BankLocator: BANK 0
Type: DDR3
TypeDetail:Synchronous
Speed:1067MHz
Manufacturer:014F
SerialNumber:00092AF2
AssetTag:54114000
PartNumber: JM1066KSN-4G
Rank:Unknown
就像上邊輸出的一樣,我在插槽1裡邊安裝了一個記憶體條。記憶體大小為4G,型別為DDR3,速度為1067 MHz。
同樣的,我們可以通過下邊命令得到完整的記憶體資訊。
sudo dmidecode -t memory
sudo dmidecode -t memory | less
sudo dmidecode -t memory | more
輸出樣本
# dmidecode 2.12
SMBIOS 2.6 present.
Handle0x0014, DMI type 16,15 bytes
PhysicalMemoryArray
Location:SystemBoardOrMotherboard
Use:SystemMemory
ErrorCorrectionType:None
MaximumCapacity:16 GB
ErrorInformationHandle:NotProvided
NumberOfDevices:2
Handle0x0017, DMI type 17,28 bytes
MemoryDevice
ArrayHandle:0x0014
ErrorInformationHandle:0x0000
TotalWidth:Unknown
DataWidth:Unknown
Size:NoModuleInstalled
FormFactor: DIMM
Set:None
Locator: DIMM_B
BankLocator: BANK 2
Type:Unknown
TypeDetail:None
Speed:Unknown
Manufacturer:NotSpecified
SerialNumber:NotSpecified
AssetTag:NotSpecified
PartNumber:NotSpecified
Rank:Unknown
Handle0x0015, DMI type 17,28 bytes
MemoryDevice
ArrayHandle:0x0014
ErrorInformationHandle:0x0000
TotalWidth:64 bits
DataWidth:64 bits
Size:4096 MB
FormFactor: SODIMM
Set:None
Locator: DIMM_A
BankLocator: BANK 0
Type: DDR3
TypeDetail:Synchronous
Speed:1067MHz
Manufacturer:014F
SerialNumber:00092AF2
AssetTag:54114000
PartNumber: JM1066KSN-4G
Rank:Unknown
如果你好奇想要知道整個系統的詳細資訊,例如主機板、記憶體、BIOS等,那麼可以輸入以下命令來獲取。
sudo dmidecode
輸出樣本
# dmidecode 2.12
SMBIOS 2.6 present.
48 structures occupying 2173 bytes.
Table at 0x000EB840.
Handle0xDA00, DMI type 218,251 bytes
OEM-specific Type
HeaderandData:
DA FB 00 DA B2 000D5F0F37407D00000000
007E0001000000 DC 0100800200 DD 0100
8003007501018001007601028001002D
01038001002E01038000008101078000
00820107800100830108800000840108
80010085010680000086010680010058
02058000005702058001009C00020001
009B00020000008A0103000100890103
0000007F010400000080010400010053
01050000005201050001007B01060000
007C0106000100940107000000930107
0001007D00080000002D00090001002E
00090000006E000A00000095000B0001
0096000B0000002F020C00010030020C
00000050020D00000051020D00010052
020D000200 FF FF 00000000
Handle0xDA01, DMI type 218,59 bytes
OEM-specific Type
HeaderandData:
DA 3B01 DA B2 000D5F0F374053020D0003
0054020D00040056020D0005004B010E
0001004A010E000000 EA 000F000100 EB
000F000000 FF FF 00000000
Handle0x0004, DMI type 4,42 bytes
ProcessorInformation
SocketDesignation: CPU 1
Type:CentralProcessor
Family:Core i3
Manufacturer:Intel
ID: A7 060301 FF FB AB BE
Signature:Type0,Family6,Model42,Stepping7
Flags:
FPU (Floating-point unit on-chip)
VME (Virtual mode extension)
DE (Debugging extension)
PSE (Page size extension)
TSC (Time stamp counter)
MSR (Model specific registers)
PAE (Physical address extension)
MCE (Machine check exception)
CX8 (CMPXCHG8 instruction supported)
APIC (On-chip APIC hardware supported)
SEP (Fast system call)
MTRR (Memory type range registers)
PGE (Pageglobal enable)
MCA (Machine check architecture)
CMOV (Conditional move instruction supported)
PAT (Page attribute table)
PSE-36(36-bit page size extension)
CLFSH (CLFLUSH instruction supported)
DS (Debug store)
ACPI (ACPI supported)
MMX (MMX technology supported)
FXSR (FXSAVE and FXSTOR instructions supported)
SSE (Streaming SIMD extensions)
SSE2 (Streaming SIMD extensions 2)
SS (Self-snoop)
HTT (Multi-threading)
TM (Thermal monitor supported)
PBE (Pendingbreak enabled)
Version:Intel(R)Core(TM) i3-2350M CPU @2.30GHz
Voltage:1.1 V
ExternalClock:100MHz
MaxSpeed:2300MHz
CurrentSpeed:2300MHz
Status:Populated,Enabled
Upgrade:Other
L1 CacheHandle:0x0005
L2 CacheHandle:0x0006
L3 CacheHandle:0x0007
SerialNumber:ToBeFilledBy O.E.M.
AssetTag:ToBeFilledBy O.E.M.
PartNumber:ToBeFilledBy O.E.M.
CoreCount:2
CoreEnabled:1
ThreadCount:2
Characteristics:
64-bit capable
Handle0x0005, DMI type 7,19 bytes
CacheInformation
SocketDesignation: L1-Cache
Configuration:Enabled,NotSocketed,Level1
OperationalMode:WriteBack
Location:Internal
InstalledSize:64 kB
MaximumSize:64 kB
Supported SRAM Types:
Other
Installed SRAM Type:Other
Speed:Unknown
ErrorCorrectionType:None
SystemType:Unified
Associativity:8-way Set-associative
Handle0x0006, DMI type 7,19 bytes
CacheInformation
SocketDesignation: L2-Cache
Configuration:Enabled,NotSocketed,Level2
OperationalMode:VariesWithMemoryAddress
Location:Internal
InstalledSize:512 kB
MaximumSize:512 kB
Supported SRAM Types:
Other
Installed SRAM Type:Other
Speed:Unknown
ErrorCorrectionType:None
SystemType:Unified
Associativity:8-way Set-associative
Handle0x0007, DMI type 7,19 bytes
CacheInformation
SocketDesignation: L3-Cache
Configuration:Enabled,NotSocketed,Level3
OperationalMode:VariesWithMemoryAddress
Location:Internal
InstalledSize:3072 kB
MaximumSize:3072 kB
Supported SRAM Types:
Other
Installed SRAM Type:Other
Speed:Unknown
ErrorCorrectionType:None
SystemType:Unified
Associativity:Other
Handle0x0008, DMI type 8,9 bytes
PortConnectorInformation
InternalReferenceDesignator: J1A1
InternalConnectorType:None
ExternalReferenceDesignator: PS2Mouse
ExternalConnectorType: PS/2
PortType:MousePort
Handle0x0009, DMI type 8,9 bytes
PortConnectorInformation
InternalReferenceDesignator: J1A1
InternalConnectorType:None
ExternalReferenceDesignator:Keyboard
ExternalConnectorType: PS/2
PortType:KeyboardPort
Handle0x000A, DMI type 8,9 bytes
PortConnectorInformation
InternalReferenceDesignator: J2A2B
InternalConnectorType:None
ExternalReferenceDesignator:Video
ExternalConnectorType: DB-15 female
PortType:VideoPort
Handle0x000B, DMI type 8,9 bytes
PortConnectorInformation
InternalReferenceDesignator: J3A1
InternalConnectorType:None
ExternalReferenceDesignator: USB1
ExternalConnectorType:AccessBus(USB)
PortType: USB
Handle0x000C, DMI type 8,9 bytes
PortConnectorInformation
InternalReferenceDesignator: J3A1
InternalConnectorType:None
ExternalReferenceDesignator: USB2
ExternalConnectorType:AccessBus(USB)
PortType: USB
Handle0x000D, DMI type 8,9 bytes
PortConnectorInformation
InternalReferenceDesignator: J3A1
InternalConnectorType:None
ExternalReferenceDesignator: USB3
ExternalConnectorType:AccessBus(USB)
PortType: USB
Handle0x000E, DMI type 8,9 bytes
PortConnectorInformation
InternalReferenceDesignator: J5A1
InternalConnectorType:None
ExternalReferenceDesignator: LAN
ExternalConnectorType: RJ-45
PortType:NetworkPort
Handle0x000F, DMI type 9,17 bytes
SystemSlotInformation
Designation: J6B2
Type: x16 PCI Express
CurrentUsage:InUse
Length:Long
ID:0
Characteristics:
3.3 V is provided
Openingis shared
PME signal is supported
BusAddress:0000:00:01.0
Handle0x0010, DMI type 9,17 bytes
SystemSlotInformation
Designation: J6B1
Type: x1 PCI Express
CurrentUsage:InUse
Length:Short
ID:1
Characteristics:
3.3 V is provided
Openingis shared
PME signal is supported
BusAddress:0000:00:1c.3
Handle0x0012, DMI type 11,5 bytes
OEM Strings
String1:DellSystem
String2:5[0003]
String3:13[P18F]
Handle0x0013, DMI type 12,5 bytes
SystemConfigurationOptions
Option1:ToBeFilledBy O.E.M.
Handle0x001C, DMI type 21,7 bytes
Built-inPointingDevice
Type:TouchPad
Interface:BusMouse
Buttons:2
Handle0x001D, DMI type 22,26 bytes
PortableBattery
Location:Sys.BatteryBay
Manufacturer:Sanyo
SerialNumber:5390
Name: DELL 4YRJH22
Chemistry:LithiumIon
DesignCapacity:45000 mWh
DesignVoltage:10800 mV
SBDS Version:1.0
MaximumError:2%
SBDS ManufactureDate:2012-02-28
OEM-specific Information:0x00000001
Handle0x001E, DMI type 32,20 bytes
SystemBootInformation
Status:No errors detected
Handle0x0020, DMI type 27,12 bytes
CoolingDevice
Type:Fan
Status: OK
OEM-specific Information:0x00000000
Handle0x0021, DMI type 28,20 bytes
TemperatureProbe
Description: CPU InternalTemperature
Location:Processor
Status: OK
MaximumValue:127.0 deg C
MinimumValue:0.0 deg C
Resolution:1.000 deg C
Tolerance:0.5 deg C
Accuracy:Unknown
OEM-specific Information:0x00000000
Handle0xB000, DMI type 176,5 bytes
OEM-specific Type
HeaderandData:
B0 0500 B0 00
Handle0xB100, DMI type 177,12 bytes
OEM-specific Type
HeaderandData:
B1 0C00 B1 1A0E000000000000
Handle0x0025, DMI type 209,12 bytes
OEM-specific Type
HeaderandData:
D1 0C25000000000305010003
Handle0x0026, DMI type 210,12 bytes
OEM-specific Type
HeaderandData:
D2 0C26000000000305200103
Handle0x0027, DMI type 211,13 bytes
OEM-specific Type
HeaderandData:
D3 0D2700010000000002030404
Strings:
Front
Handle0x0028, DMI type 212,57 bytes
OEM-specific Type
HeaderandData:
D4 39280070007100014950489C0049 FC
019B0049 FC 007F014A FB 0480014A FB 00
53014A F7 0852014A F7 087B014A EF 107C
014A EF 10 FF FF 000000
Handle0x002A, DMI type 217,8 bytes
OEM-specific Type
HeaderandData:
D9 082A0001020000
Strings:
Handle0x002B, DMI type 219,11 bytes
OEM-specific Type
HeaderandData:
DB 0B2B0000010203000405
Strings:
Handle0x002C, DMI type 220,22 bytes
OEM-specific Type
HeaderandData:
DC 162C0001 F0 000002 F0 0000000003 F0
04 F0 00000000
Handle0x002D, DMI type 221,19 bytes
OEM-specific Type
HeaderandData:
DD 132D00000000000003000000000000
000000
Handle0x002E, DMI type 222,16 bytes
OEM-specific Type
HeaderandData:
DE 102E000108 FF FF 0000000000000000
Handle0x0014, DMI type 16,15 bytes
PhysicalMemoryArray
Location:SystemBoardOrMotherboard
Use:SystemMemory
ErrorCorrectionType:None
MaximumCapacity:16 GB
ErrorInformationHandle:NotProvided
NumberOfDevices:2
Handle0x0016, DMI type 20,19 bytes
MemoryDeviceMappedAddress
StartingAddress:0x00000000000
EndingAddress:0x000FFFFFFFF
RangeSize:4 GB
PhysicalDeviceHandle:0x0015
MemoryArrayMappedAddressHandle:0x0018
PartitionRowPosition:1
InterleavePosition:1
InterleavedDataDepth:1
Handle0x0017, DMI type 17,28 bytes
MemoryDevice
ArrayHandle:0x0014
ErrorInformationHandle:0x0000
TotalWidth:Unknown
DataWidth:Unknown
Size:NoModuleInstalled
FormFactor: DIMM
Set:None
Locator: DIMM_B
BankLocator: BANK 2
Type:Unknown
TypeDetail:None
Speed:Unknown
Manufacturer:NotSpecified
SerialNumber:NotSpecified
AssetTag:NotSpecified
PartNumber:NotSpecified
Rank:Unknown
Handle0x0018, DMI type 19,15 bytes
MemoryArrayMappedAddress
StartingAddress:0x00000000000
EndingAddress:0x000FFFFFFFF
RangeSize:4 GB
PhysicalArrayHandle:0x0014
PartitionWidth:2
Handle0x002F, DMI type 13,22 bytes
BIOS LanguageInformation
LanguageDescriptionFormat:Abbreviated
InstallableLanguages:1
eng
CurrentlyInstalledLanguage: eng
Handle0x0030, DMI type 131,64 bytes
OEM-specific Type
HeaderandData:
83403000310000000000000000000000
F8 004B1C FF FF FF FF 0100000000000700
AD 04040000000000 C8 00 FF FF 00000000
00000000320000007650726F00000000
Handle0x0029, DMI type 216,9 bytes
OEM-specific Type
HeaderandData:
D8 0929000102010000
Strings:
INTEL
0000
Handle0x0000, DMI type 0,24 bytes
BIOS Information
Vendor:DellInc.
Version: A05
ReleaseDate:08/03/2012
Address:0xF0000
RuntimeSize:64 kB
ROM Size:2048 kB
Characteristics:
MCA is supported
PCI is supported
BIOS is upgradeable
BIOS shadowing is allowed
ESCD support is available
Bootfrom CD is supported
Selectable boot is supported
BIOS ROM is socketed
EDD is supported
5.25"/1.2 MB floppy services are supported (int 13h)
3.5"/720 kB floppy services are supported (int13h)
3.5"/2.88 MB floppy services are supported (int 13h)
Print screen service is supported (int 5h)
8042 keyboard services are supported (int 9h)
Serial services are supported (int 14h)
Printer services are supported (int 17h)
CGA/mono video services are supported (int 10h)
ACPI is supported
USB legacy is supported
ATAPI Zip drive boot is supported
BIOS boot specification is supported
Targeted content distribution is supported
BIOS Revision: 0.5
Firmware Revision: 0.5
Handle 0x0002, DMI type 2, 15 bytes
Base Board Information
Manufacturer: Dell Inc.
Product Name: 01HXXJ
Version: A05
Serial Number: .JSQ7PA1.CN7117623M00J2.
Asset Tag: Not Specified
Features:
Board is a hosting board
Board is replaceable
Location In Chassis: To Be Filled By O.E.M.
Chassis Handle: 0x0003
Type: Motherboard
Contained Object Handles: 0
Handle 0x0003, DMI type 3, 21 bytes
Chassis Information
Manufacturer: Dell Inc.
Type: Portable
Lock: Not Present
Version: Not Specified
Serial Number: JSR1
Asset Tag: Not Specified
Boot-up State: Safe
Power Supply State: Safe
Thermal State: Safe
Security Status: None
OEM Information: 0x00000000
Height: Unspecified
Number Of Power Cords: 1
Contained Elements: 0
Handle 0x0001, DMI type 1, 27 bytes
System Information
Manufacturer: Dell Inc.
Product Name: Inspiron N5050
Version: Not Specified
Serial Number: JSR1
UUID: 4C4C4544-0053-5110-8029-CAC05241
Wake-up Type: Power Switch
SKU Number: To be filled by O.E.M.
Family:
Handle 0x0024, DMI type 208, 12 bytes
OEM-specific Type
Header and Data:
D0 0C 24 00 02 05 FE 00 04 05 01 02
Strings:
20120323
20120323
Handle 0x0011, DMI type 10, 6 bytes
On Board Device Information
Type: Video
Status: Enabled
Description: Mobile Intel SandyBridge HD Graphics
Handle 0x0015, DMI type 17, 28 bytes
Memory Device
Array Handle: 0x0014
Error Information Handle: 0x0000
Total Width: 64 bits
Data Width: 64 bits
Size: 4096 MB
Form Factor: SODIMM
Set: None
Locator: DIMM_A
Bank Locator: BANK 0
Type: DDR3
Type Detail: Synchronous
Speed: 1067 MHz
Manufacturer: 014F
Serial Number: 0009F2
Asset Tag: 54114000
Part Number: JM1066-4G
Rank: Unknown
Handle 0x0031, DMI type 127, 4 bytes
End Of Table
好了,就是這樣。
本文永久更新連結地址:http://www.linuxidc.com/Linux/2015-03/115618.htm
相關文章