大多数情况下你可以从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.12SMBIOS 2.6 present.Handle0x0014, DMI type 16,15 bytesPhysicalMemoryArrayLocation:SystemBoardOrMotherboardUse:SystemMemoryErrorCorrectionType:NoneMaximumCapacity:16 GBErrorInformationHandle:NotProvidedNumberOfDevices:2
就像你看到的,我的系统支持最大内存到16G,并且有两个内存插槽,简单吧?接下来,让我们找出现在已经安装的内存的详细信息。
sudo dmidecode -t 17
输出样本# dmidecode 2.12SMBIOS 2.6 present.Handle0x0017, DMI type 17,28 bytesMemoryDeviceArrayHandle:0x0014ErrorInformationHandle:0x0000TotalWidth:UnknownDataWidth:UnknownSize:NoModuleInstalledFormFactor: DIMMSet:NoneLocator: DIMM_BBankLocator: BANK 2Type:UnknownTypeDetail:NoneSpeed:UnknownManufacturer:NotSpecifiedSerialNumber:NotSpecifiedAssetTag:NotSpecifiedPartNumber:NotSpecifiedRank:UnknownHandle0x0015, DMI type 17,28 bytesMemoryDeviceArrayHandle:0x0014ErrorInformationHandle:0x0000TotalWidth:64 bitsDataWidth:64 bitsSize:4096 MBFormFactor: SODIMMSet:NoneLocator: DIMM_ABankLocator: BANK 0Type: DDR3TypeDetail:SynchronousSpeed:1067MHzManufacturer:014FSerialNumber:00092AF2AssetTag:54114000PartNumber: JM1066KSN-4GRank:Unknown
就像上边输出的一样,我在插槽1里边安装了一个内存条。内存大小为
4G,类型为
DDR3,速度为
1067 MHz。同样的,我们可以通过下边命令得到完整的内存信息。
sudo dmidecode -t memorysudo dmidecode -t memory | lesssudo dmidecode -t memory | more
输出样本# dmidecode 2.12SMBIOS 2.6 present.Handle0x0014, DMI type 16,15 bytesPhysicalMemoryArrayLocation:SystemBoardOrMotherboardUse:SystemMemoryErrorCorrectionType:NoneMaximumCapacity:16 GBErrorInformationHandle:NotProvidedNumberOfDevices:2Handle0x0017, DMI type 17,28 bytesMemoryDeviceArrayHandle:0x0014ErrorInformationHandle:0x0000TotalWidth:UnknownDataWidth:UnknownSize:NoModuleInstalledFormFactor: DIMMSet:NoneLocator: DIMM_BBankLocator: BANK 2Type:UnknownTypeDetail:NoneSpeed:UnknownManufacturer:NotSpecifiedSerialNumber:NotSpecifiedAssetTag:NotSpecifiedPartNumber:NotSpecifiedRank:UnknownHandle0x0015, DMI type 17,28 bytesMemoryDeviceArrayHandle:0x0014ErrorInformationHandle:0x0000TotalWidth:64 bitsDataWidth:64 bitsSize:4096 MBFormFactor: SODIMMSet:NoneLocator: DIMM_ABankLocator: BANK 0Type: DDR3TypeDetail:SynchronousSpeed:1067MHzManufacturer:014FSerialNumber:00092AF2AssetTag:54114000PartNumber: JM1066KSN-4GRank:Unknown
如果你好奇想要知道整个系统的详细信息,例如主板、内存、BIOS等,那么可以输入以下命令来获取。
sudo dmidecode输出样本# dmidecode 2.12SMBIOS 2.6 present.48 structures occupying 2173 bytes.Table at 0x000EB840.Handle0xDA00, DMI type 218,251 bytesOEM-specific TypeHeaderandData:DA FB 00 DA B2 000D5F0F37407D00000000007E0001000000 DC 0100800200 DD 01008003007501018001007601028001002D01038001002E01038000008101078000008201078001008301088000008401088001008501068000008601068001005802058000005702058001009C00020001009B00020000008A01030001008901030000007F01040000008001040001005301050000005201050001007B01060000007C01060001009401070000009301070001007D00080000002D00090001002E00090000006E000A00000095000B00010096000B0000002F020C00010030020C00000050020D00000051020D00010052020D000200 FF FF 00000000Handle0xDA01, DMI type 218,59 bytesOEM-specific TypeHeaderandData:DA 3B01 DA B2 000D5F0F374053020D00030054020D00040056020D0005004B010E0001004A010E000000 EA 000F000100 EB000F000000 FF FF 00000000Handle0x0004, DMI type 4,42 bytesProcessorInformationSocketDesignation: CPU 1Type:CentralProcessorFamily:Core i3Manufacturer:IntelID: A7 060301 FF FB AB BESignature:Type0,Family6,Model42,Stepping7Flags: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.30GHzVoltage:1.1 VExternalClock:100MHzMaxSpeed:2300MHzCurrentSpeed:2300MHzStatus:Populated,EnabledUpgrade:OtherL1 CacheHandle:0x0005L2 CacheHandle:0x0006L3 CacheHandle:0x0007SerialNumber:ToBeFilledBy O.E.M.AssetTag:ToBeFilledBy O.E.M.PartNumber:ToBeFilledBy O.E.M.CoreCount:2CoreEnabled:1ThreadCount:2Characteristics:64-bit capableHandle0x0005, DMI type 7,19 bytesCacheInformationSocketDesignation: L1-CacheConfiguration:Enabled,NotSocketed,Level1OperationalMode:WriteBackLocation:InternalInstalledSize:64 kBMaximumSize:64 kBSupported SRAM Types:OtherInstalled SRAM Type:OtherSpeed:UnknownErrorCorrectionType:NoneSystemType:UnifiedAssociativity:8-way Set-associativeHandle0x0006, DMI type 7,19 bytesCacheInformationSocketDesignation: L2-CacheConfiguration:Enabled,NotSocketed,Level2OperationalMode:VariesWithMemoryAddressLocation:InternalInstalledSize:512 kBMaximumSize:512 kBSupported SRAM Types:OtherInstalled SRAM Type:OtherSpeed:UnknownErrorCorrectionType:NoneSystemType:UnifiedAssociativity:8-way Set-associativeHandle0x0007, DMI type 7,19 bytesCacheInformationSocketDesignation: L3-CacheConfiguration:Enabled,NotSocketed,Level3OperationalMode:VariesWithMemoryAddressLocation:InternalInstalledSize:3072 kBMaximumSize:3072 kBSupported SRAM Types:OtherInstalled SRAM Type:OtherSpeed:UnknownErrorCorrectionType:NoneSystemType:UnifiedAssociativity:OtherHandle0x0008, DMI type 8,9 bytesPortConnectorInformationInternalReferenceDesignator: J1A1InternalConnectorType:NoneExternalReferenceDesignator: PS2MouseExternalConnectorType: PS/2PortType:MousePortHandle0x0009, DMI type 8,9 bytesPortConnectorInformationInternalReferenceDesignator: J1A1InternalConnectorType:NoneExternalReferenceDesignator:KeyboardExternalConnectorType: PS/2PortType:KeyboardPortHandle0x000A, DMI type 8,9 bytesPortConnectorInformationInternalReferenceDesignator: J2A2BInternalConnectorType:NoneExternalReferenceDesignator:VideoExternalConnectorType: DB-15 femalePortType:VideoPortHandle0x000B, DMI type 8,9 bytesPortConnectorInformationInternalReferenceDesignator: J3A1InternalConnectorType:NoneExternalReferenceDesignator: USB1ExternalConnectorType:AccessBus(USB)PortType: USBHandle0x000C, DMI type 8,9 bytesPortConnectorInformationInternalReferenceDesignator: J3A1InternalConnectorType:NoneExternalReferenceDesignator: USB2ExternalConnectorType:AccessBus(USB)PortType: USBHandle0x000D, DMI type 8,9 bytesPortConnectorInformationInternalReferenceDesignator: J3A1InternalConnectorType:NoneExternalReferenceDesignator: USB3ExternalConnectorType:AccessBus(USB)PortType: USBHandle0x000E, DMI type 8,9 bytesPortConnectorInformationInternalReferenceDesignator: J5A1InternalConnectorType:NoneExternalReferenceDesignator: LANExternalConnectorType: RJ-45PortType:NetworkPortHandle0x000F, DMI type 9,17 bytesSystemSlotInformationDesignation: J6B2Type: x16 PCI ExpressCurrentUsage:InUseLength:LongID:0Characteristics:3.3 V is providedOpeningis sharedPME signal is supportedBusAddress:0000:00:01.0Handle0x0010, DMI type 9,17 bytesSystemSlotInformationDesignation: J6B1Type: x1 PCI ExpressCurrentUsage:InUseLength:ShortID:1Characteristics:3.3 V is providedOpeningis sharedPME signal is supportedBusAddress:0000:00:1c.3Handle0x0012, DMI type 11,5 bytesOEM StringsString1:DellSystemString2:5[0003]String3:13[P18F]Handle0x0013, DMI type 12,5 bytesSystemConfigurationOptionsOption1:ToBeFilledBy O.E.M.Handle0x001C, DMI type 21,7 bytesBuilt-inPointingDeviceType:TouchPadInterface:BusMouseButtons:2Handle0x001D, DMI type 22,26 bytesPortableBatteryLocation:Sys.BatteryBayManufacturer:SanyoSerialNumber:5390Name: DELL 4YRJH22Chemistry:LithiumIonDesignCapacity:45000 mWhDesignVoltage:10800 mVSBDS Version:1.0MaximumError:2%SBDS ManufactureDate:2012-02-28OEM-specific Information:0x00000001Handle0x001E, DMI type 32,20 bytesSystemBootInformationStatus:No errors detectedHandle0x0020, DMI type 27,12 bytesCoolingDeviceType:FanStatus: OKOEM-specific Information:0x00000000Handle0x0021, DMI type 28,20 bytesTemperatureProbeDescription: CPU InternalTemperatureLocation:ProcessorStatus: OKMaximumValue:127.0 deg CMinimumValue:0.0 deg CResolution:1.000 deg CTolerance:0.5 deg CAccuracy:UnknownOEM-specific Information:0x00000000Handle0xB000, DMI type 176,5 bytesOEM-specific TypeHeaderandData:B0 0500 B0 00Handle0xB100, DMI type 177,12 bytesOEM-specific TypeHeaderandData:B1 0C00 B1 1A0E000000000000Handle0x0025, DMI type 209,12 bytesOEM-specific TypeHeaderandData:D1 0C25000000000305010003Handle0x0026, DMI type 210,12 bytesOEM-specific TypeHeaderandData:D2 0C26000000000305200103Handle0x0027, DMI type 211,13 bytesOEM-specific TypeHeaderandData:D3 0D2700010000000002030404Strings:FrontHandle0x0028, DMI type 212,57 bytesOEM-specific TypeHeaderandData:D4 39280070007100014950489C0049 FC019B0049 FC 007F014A FB 0480014A FB 0053014A F7 0852014A F7 087B014A EF 107C014A EF 10 FF FF 000000Handle0x002A, DMI type 217,8 bytesOEM-specific TypeHeaderandData:D9 082A0001020000Strings:Handle0x002B, DMI type 219,11 bytesOEM-specific TypeHeaderandData:DB 0B2B0000010203000405Strings:Handle0x002C, DMI type 220,22 bytesOEM-specific TypeHeaderandData:DC 162C0001 F0 000002 F0 0000000003 F004 F0 00000000Handle0x002D, DMI type 221,19 bytesOEM-specific TypeHeaderandData:DD 132D00000000000003000000000000000000Handle0x002E, DMI type 222,16 bytesOEM-specific TypeHeaderandData:DE 102E000108 FF FF 0000000000000000Handle0x0014, DMI type 16,15 bytesPhysicalMemoryArrayLocation:SystemBoardOrMotherboardUse:SystemMemoryErrorCorrectionType:NoneMaximumCapacity:16 GBErrorInformationHandle:NotProvidedNumberOfDevices:2Handle0x0016, DMI type 20,19 bytesMemoryDeviceMappedAddressStartingAddress:0x00000000000EndingAddress:0x000FFFFFFFFRangeSize:4 GBPhysicalDeviceHandle:0x0015MemoryArrayMappedAddressHandle:0x0018PartitionRowPosition:1InterleavePosition:1InterleavedDataDepth:1Handle0x0017, DMI type 17,28 bytesMemoryDeviceArrayHandle:0x0014ErrorInformationHandle:0x0000TotalWidth:UnknownDataWidth:UnknownSize:NoModuleInstalledFormFactor: DIMMSet:NoneLocator: DIMM_BBankLocator: BANK 2Type:UnknownTypeDetail:NoneSpeed:UnknownManufacturer:NotSpecifiedSerialNumber:NotSpecifiedAssetTag:NotSpecifiedPartNumber:NotSpecifiedRank:UnknownHandle0x0018, DMI type 19,15 bytesMemoryArrayMappedAddressStartingAddress:0x00000000000EndingAddress:0x000FFFFFFFFRangeSize:4 GBPhysicalArrayHandle:0x0014PartitionWidth:2Handle0x002F, DMI type 13,22 bytesBIOS LanguageInformationLanguageDescriptionFormat:AbbreviatedInstallableLanguages:1engCurrentlyInstalledLanguage: engHandle0x0030, DMI type 131,64 bytesOEM-specific TypeHeaderandData:83403000310000000000000000000000F8 004B1C FF FF FF FF 0100000000000700AD 04040000000000 C8 00 FF FF 0000000000000000320000007650726F00000000Handle0x0029, DMI type 216,9 bytesOEM-specific TypeHeaderandData:D8 0929000102010000Strings:INTEL0000Handle0x0000, DMI type 0,24 bytesBIOS InformationVendor:DellInc.Version: A05ReleaseDate:08/03/2012Address:0xF0000RuntimeSize:64 kBROM Size:2048 kBCharacteristics:MCA is supportedPCI is supportedBIOS is upgradeableBIOS shadowing is allowedESCD support is availableBootfrom CD is supportedSelectable boot is supportedBIOS ROM is socketedEDD is supported5.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 supportedUSB legacy is supportedATAPI Zip drive boot is supportedBIOS boot specification is supportedTargeted content distribution is supportedBIOS Revision: 0.5Firmware Revision: 0.5Handle 0x0002, DMI type 2, 15 bytesBase Board InformationManufacturer: Dell Inc.Product Name: 01HXXJVersion: A05Serial Number: .JSQ7PA1.CN7117623M00J2.Asset Tag: Not SpecifiedFeatures:Board is a hosting boardBoard is replaceableLocation In Chassis: To Be Filled By O.E.M.Chassis Handle: 0x0003Type: MotherboardContained Object Handles: 0Handle 0x0003, DMI type 3, 21 bytesChassis InformationManufacturer: Dell Inc.Type: PortableLock: Not PresentVersion: Not SpecifiedSerial Number: JSR1Asset Tag: Not SpecifiedBoot-up State: SafePower Supply State: SafeThermal State: SafeSecurity Status: NoneOEM Information: 0x00000000Height: UnspecifiedNumber Of Power Cords: 1Contained Elements: 0Handle 0x0001, DMI type 1, 27 bytesSystem InformationManufacturer: Dell Inc.Product Name: Inspiron N5050Version: Not SpecifiedSerial Number: JSR1UUID: 4C4C4544-0053-5110-8029-CAC05241Wake-up Type: Power SwitchSKU Number: To be filled by O.E.M.Family: Handle 0x0024, DMI type 208, 12 bytesOEM-specific TypeHeader and Data:D0 0C 24 00 02 05 FE 00 04 05 01 02Strings:2012032320120323Handle 0x0011, DMI type 10, 6 bytesOn Board Device InformationType: VideoStatus: EnabledDescription: Mobile Intel SandyBridge HD GraphicsHandle 0x0015, DMI type 17, 28 bytesMemory DeviceArray Handle: 0x0014Error Information Handle: 0x0000Total Width: 64 bitsData Width: 64 bitsSize: 4096 MBForm Factor: SODIMMSet: NoneLocator: DIMM_ABank Locator: BANK 0Type: DDR3Type Detail: SynchronousSpeed: 1067 MHzManufacturer: 014FSerial Number: 0009F2Asset Tag: 54114000 Part Number: JM1066-4G Rank: UnknownHandle 0x0031, DMI type 127, 4 bytesEnd Of Table
好了,就是这样。
本文永久更新链接地址