linux系统支持最大内存,Linux系统入门教程:如何找出你的系统所支持的最大内存...

5c137378c483823cca9a90207496e356.png

大多数情况下你可以从BIOS、产品目录或者干脆手动找出你的系统所持的最大内存。这里,我们介绍一种简单有用的技巧——使用dmidecode来找出系统支持的最大内存,这样你就无需打开机箱或者参照BIOS和产品目录了。

什么是 dmidecode?

就像你可能知道的一样, dmidecode是一个将计算机DMI(又名SMBIOS)表的内容转换为可读格式的工具。这个表包含了系统硬件组件的介绍以及其他一些如序列号和IOS版本等有用的信息。使用dmidecode你能够获取此项信息,而无需去探测真实的硬件。

找出你的系统所支持的最大内存

请确定你已经在系统中安装了dmidecode,我觉得你的操作系统应该已经自动安装过了,不过并不非常确定。

在基于Deb的系统中安装

sudo apt-getinstall dmidecode

在基于RPM的系统中安装

sudo yum install dmidecode

在SUSE/openSUSE中安装

sudo zypperindmidecode

好了,我们已经安装了dmidecode,接下来让我们找出支持的最大内存。输入以下命令:

sudo dmidecode-t16

输出样本

# dmidecode 2.12

SMBIOS2.6present.

Handle0x0014,DMI type16,15bytes

PhysicalMemoryArray

Location:SystemBoardOrMotherboard

Use:SystemMemory

ErrorCorrectionType:None

MaximumCapacity:16GB

ErrorInformationHandle:NotProvided

NumberOfDevices:2

就像你看到的,我的系统支持最大内存到16G,并且有两个内存插槽,简单吧?

接下来,让我们找出现在已经安装的内存的详细信息。

sudo dmidecode-t17

输出样本

# dmidecode 2.12

SMBIOS2.6present.

Handle0x0017,DMI type17,28bytes

MemoryDevice

ArrayHandle:0x0014

ErrorInformationHandle:0x0000

TotalWidth:Unknown

DataWidth:Unknown

Size:NoModuleInstalled

FormFactor:DIMM

Set:None

Locator:DIMM_B

BankLocator:BANK2

Type:Unknown

TypeDetail:None

Speed:Unknown

Manufacturer:NotSpecified

SerialNumber:NotSpecified

AssetTag:NotSpecified

PartNumber:NotSpecified

Rank:Unknown

Handle0x0015,DMI type17,28bytes

MemoryDevice

ArrayHandle:0x0014

ErrorInformationHandle:0x0000

TotalWidth:64bits

DataWidth:64bits

Size:4096MB

FormFactor:SODIMM

Set:None

Locator:DIMM_A

BankLocator:BANK0

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

SMBIOS2.6present.

Handle0x0014,DMI type16,15bytes

PhysicalMemoryArray

Location:SystemBoardOrMotherboard

Use:SystemMemory

ErrorCorrectionType:None

MaximumCapacity:16GB

ErrorInformationHandle:NotProvided

NumberOfDevices:2

Handle0x0017,DMI type17,28bytes

MemoryDevice

ArrayHandle:0x0014

ErrorInformationHandle:0x0000

TotalWidth:Unknown

DataWidth:Unknown

Size:NoModuleInstalled

FormFactor:DIMM

Set:None

Locator:DIMM_B

BankLocator:BANK2

Type:Unknown

TypeDetail:None

Speed:Unknown

Manufacturer:NotSpecified

SerialNumber:NotSpecified

AssetTag:NotSpecified

PartNumber:NotSpecified

Rank:Unknown

Handle0x0015,DMI type17,28bytes

MemoryDevice

ArrayHandle:0x0014

ErrorInformationHandle:0x0000

TotalWidth:64bits

DataWidth:64bits

Size:4096MB

FormFactor:SODIMM

Set:None

Locator:DIMM_A

BankLocator:BANK0

Type:DDR3

TypeDetail:Synchronous

Speed:1067MHz

Manufacturer:014F

SerialNumber:00092AF2

AssetTag:54114000

PartNumber:JM1066KSN-4G

Rank:Unknown

如果你好奇想要知道整个系统的详细信息,例如主板、内存、BIOS等,那么可以输入以下命令来获取。

sudo dmidecode

输出样本

# dmidecode 2.12

SMBIOS2.6present.

48structures occupying2173bytes.

Tableat0x000EB840.

Handle0xDA00,DMI type218,251bytes

OEM-specificType

HeaderandData:

DA FB00DA B2000D5F0F37407D00000000

007E0001000000DC0100800200DD0100

8003007501018001007601028001002D

01038001002E01038000008101078000

00820107800100830108800000840108

80010085010680000086010680010058

02058000005702058001009C00020001

009B00020000008A0103000100890103

0000007F010400000080010400010053

01050000005201050001007B01060000

007C0106000100940107000000930107

0001007D00080000002D00090001002E

00090000006E000A00000095000B0001

0096000B0000002F020C00010030020C

00000050020D00000051020D00010052

020D000200FF FF00000000

Handle0xDA01,DMI type218,59bytes

OEM-specificType

HeaderandData:

DA3B01DA B2000D5F0F374053020D0003

0054020D00040056020D0005004B010E

0001004A010E000000EA000F000100EB

000F000000FF FF00000000

Handle0x0004,DMI type4,42bytes

ProcessorInformation

SocketDesignation:CPU1

Type:CentralProcessor

Family:Corei3

Manufacturer:Intel

ID:A7060301FF FB AB BE

Signature:Type0,Family6,Model42,Stepping7

Flags:

FPU(Floating-point unit on-chip)

VME(Virtualmode extension)

DE(Debuggingextension)

PSE(Pagesize extension)

TSC(Timestamp counter)

MSR(Modelspecific registers)

PAE(Physicaladdress extension)

MCE(Machinecheck exception)

CX8(CMPXCHG8 instruction supported)

APIC(On-chip APIC hardware supported)

SEP(Fastsystem call)

MTRR(Memorytype range registers)

PGE(Pageglobalenable)

MCA(Machinecheck architecture)

CMOV(Conditionalmove instruction supported)

PAT(Pageattribute table)

PSE-36(36-bit page size extension)

CLFSH(CLFLUSH instruction supported)

DS(Debugstore)

ACPI(ACPI supported)

MMX(MMX technology supported)

FXSR(FXSAVEandFXSTOR instructions supported)

SSE(StreamingSIMD extensions)

SSE2(StreamingSIMD extensions2)

SS(Self-snoop)

HTT(Multi-threading)

TM(Thermalmonitor supported)

PBE(Pendingbreakenabled)

Version:Intel(R)Core(TM)i3-2350MCPU@2.30GHz

Voltage:1.1V

ExternalClock:100MHz

MaxSpeed:2300MHz

CurrentSpeed:2300MHz

Status:Populated,Enabled

Upgrade:Other

L1CacheHandle:0x0005

L2CacheHandle:0x0006

L3CacheHandle:0x0007

SerialNumber:ToBeFilledByO.E.M.

AssetTag:ToBeFilledByO.E.M.

PartNumber:ToBeFilledByO.E.M.

CoreCount:2

CoreEnabled:1

ThreadCount:2

Characteristics:

64-bit capable

Handle0x0005,DMI type7,19bytes

CacheInformation

SocketDesignation:L1-Cache

Configuration:Enabled,NotSocketed,Level1

OperationalMode:WriteBack

Location:Internal

InstalledSize:64kB

MaximumSize:64kB

SupportedSRAMTypes:

Other

InstalledSRAMType:Other

Speed:Unknown

ErrorCorrectionType:None

SystemType:Unified

Associativity:8-waySet-associative

Handle0x0006,DMI type7,19bytes

CacheInformation

SocketDesignation:L2-Cache

Configuration:Enabled,NotSocketed,Level2

OperationalMode:VariesWithMemoryAddress

Location:Internal

InstalledSize:512kB

MaximumSize:512kB

SupportedSRAMTypes:

Other

InstalledSRAMType:Other

Speed:Unknown

ErrorCorrectionType:None

SystemType:Unified

Associativity:8-waySet-associative

Handle0x0007,DMI type7,19bytes

CacheInformation

SocketDesignation:L3-Cache

Configuration:Enabled,NotSocketed,Level3

OperationalMode:VariesWithMemoryAddress

Location:Internal

InstalledSize:3072kB

MaximumSize:3072kB

SupportedSRAMTypes:

Other

InstalledSRAMType:Other

Speed:Unknown

ErrorCorrectionType:None

SystemType:Unified

Associativity:Other

Handle0x0008,DMI type8,9bytes

PortConnectorInformation

InternalReferenceDesignator:J1A1

InternalConnectorType:None

ExternalReferenceDesignator:PS2Mouse

ExternalConnectorType:PS/2

PortType:MousePort

Handle0x0009,DMI type8,9bytes

PortConnectorInformation

InternalReferenceDesignator:J1A1

InternalConnectorType:None

ExternalReferenceDesignator:Keyboard

ExternalConnectorType:PS/2

PortType:KeyboardPort

Handle0x000A,DMI type8,9bytes

PortConnectorInformation

InternalReferenceDesignator:J2A2B

InternalConnectorType:None

ExternalReferenceDesignator:Video

ExternalConnectorType:DB-15female

PortType:VideoPort

Handle0x000B,DMI type8,9bytes

PortConnectorInformation

InternalReferenceDesignator:J3A1

InternalConnectorType:None

ExternalReferenceDesignator:USB1

ExternalConnectorType:AccessBus(USB)

PortType:USB

Handle0x000C,DMI type8,9bytes

PortConnectorInformation

InternalReferenceDesignator:J3A1

InternalConnectorType:None

ExternalReferenceDesignator:USB2

ExternalConnectorType:AccessBus(USB)

PortType:USB

Handle0x000D,DMI type8,9bytes

PortConnectorInformation

InternalReferenceDesignator:J3A1

InternalConnectorType:None

ExternalReferenceDesignator:USB3

ExternalConnectorType:AccessBus(USB)

PortType:USB

Handle0x000E,DMI type8,9bytes

PortConnectorInformation

InternalReferenceDesignator:J5A1

InternalConnectorType:None

ExternalReferenceDesignator:LAN

ExternalConnectorType:RJ-45

PortType:NetworkPort

Handle0x000F,DMI type9,17bytes

SystemSlotInformation

Designation:J6B2

Type:x16 PCIExpress

CurrentUsage:InUse

Length:Long

ID:0

Characteristics:

3.3Visprovided

Openingisshared

PME signalissupported

BusAddress:0000:00:01.0

Handle0x0010,DMI type9,17bytes

SystemSlotInformation

Designation:J6B1

Type:x1 PCIExpress

CurrentUsage:InUse

Length:Short

ID:1

Characteristics:

3.3Visprovided

Openingisshared

PME signalissupported

BusAddress:0000:00:1c.3

Handle0x0012,DMI type11,5bytes

OEMStrings

String1:DellSystem

String2:5[0003]

String3:13[P18F]

Handle0x0013,DMI type12,5bytes

SystemConfigurationOptions

Option1:ToBeFilledByO.E.M.

Handle0x001C,DMI type21,7bytes

Built-inPointingDevice

Type:TouchPad

Interface:BusMouse

Buttons:2

Handle0x001D,DMI type22,26bytes

PortableBattery

Location:Sys.BatteryBay

Manufacturer:Sanyo

SerialNumber:5390

Name:DELL4YRJH22

Chemistry:LithiumIon

DesignCapacity:45000mWh

DesignVoltage:10800mV

SBDSVersion:1.0

MaximumError:2%

SBDSManufactureDate:2012-02-28

OEM-specificInformation:0x00000001

Handle0x001E,DMI type32,20bytes

SystemBootInformation

Status:Noerrors detected

Handle0x0020,DMI type27,12bytes

CoolingDevice

Type:Fan

Status:OK

OEM-specificInformation:0x00000000

Handle0x0021,DMI type28,20bytes

TemperatureProbe

Description:CPUInternalTemperature

Location:Processor

Status:OK

MaximumValue:127.0deg C

MinimumValue:0.0deg C

Resolution:1.000deg C

Tolerance:0.5deg C

Accuracy:Unknown

OEM-specificInformation:0x00000000

Handle0xB000,DMI type176,5bytes

OEM-specificType

HeaderandData:

B00500B000

Handle0xB100,DMI type177,12bytes

OEM-specificType

HeaderandData:

B10C00B11A0E000000000000

Handle0x0025,DMI type209,12bytes

OEM-specificType

HeaderandData:

D10C25000000000305010003

Handle0x0026,DMI type210,12bytes

OEM-specificType

HeaderandData:

D20C26000000000305200103

Handle0x0027,DMI type211,13bytes

OEM-specificType

HeaderandData:

D30D2700010000000002030404

Strings:

Front

Handle0x0028,DMI type212,57bytes

OEM-specificType

HeaderandData:

D439280070007100014950489C0049FC

019B0049FC007F014AFB0480014AFB00

53014AF70852014AF7087B014AEF107C

014AEF10FF FF000000

Handle0x002A,DMI type217,8bytes

OEM-specificType

HeaderandData:

D9082A0001020000

Strings:

Handle0x002B,DMI type219,11bytes

OEM-specificType

HeaderandData:

DB0B2B0000010203000405

Strings:

Handle0x002C,DMI type220,22bytes

OEM-specificType

HeaderandData:

DC162C0001F0000002F00000000003F0

04F000000000

Handle0x002D,DMI type221,19bytes

OEM-specificType

HeaderandData:

DD132D00000000000003000000000000

000000

Handle0x002E,DMI type222,16bytes

OEM-specificType

HeaderandData:

DE102E000108FF FF0000000000000000

Handle0x0014,DMI type16,15bytes

PhysicalMemoryArray

Location:SystemBoardOrMotherboard

Use:SystemMemory

ErrorCorrectionType:None

MaximumCapacity:16GB

ErrorInformationHandle:NotProvided

NumberOfDevices:2

Handle0x0016,DMI type20,19bytes

MemoryDeviceMappedAddress

StartingAddress:0x00000000000

EndingAddress:0x000FFFFFFFF

RangeSize:4GB

PhysicalDeviceHandle:0x0015

MemoryArrayMappedAddressHandle:0x0018

PartitionRowPosition:1

InterleavePosition:1

InterleavedDataDepth:1

Handle0x0017,DMI type17,28bytes

MemoryDevice

ArrayHandle:0x0014

ErrorInformationHandle:0x0000

TotalWidth:Unknown

DataWidth:Unknown

Size:NoModuleInstalled

FormFactor:DIMM

Set:None

Locator:DIMM_B

BankLocator:BANK2

Type:Unknown

TypeDetail:None

Speed:Unknown

Manufacturer:NotSpecified

SerialNumber:NotSpecified

AssetTag:NotSpecified

PartNumber:NotSpecified

Rank:Unknown

Handle0x0018,DMI type19,15bytes

MemoryArrayMappedAddress

StartingAddress:0x00000000000

EndingAddress:0x000FFFFFFFF

RangeSize:4GB

PhysicalArrayHandle:0x0014

PartitionWidth:2

Handle0x002F,DMI type13,22bytes

BIOSLanguageInformation

LanguageDescriptionFormat:Abbreviated

InstallableLanguages:1

eng

CurrentlyInstalledLanguage:eng

Handle0x0030,DMI type131,64bytes

OEM-specificType

HeaderandData:

83403000310000000000000000000000

F8004B1CFF FF FF FF0100000000000700

AD04040000000000C800FF FF00000000

00000000320000007650726F00000000

Handle0x0029,DMI type216,9bytes

OEM-specificType

HeaderandData:

D80929000102010000

Strings:

INTEL

0000

Handle0x0000,DMI type0,24bytes

BIOSInformation

Vendor:DellInc.

Version:A05

ReleaseDate:08/03/2012

Address:0xF0000

RuntimeSize:64kB

ROMSize:2048kB

Characteristics:

MCAissupported

PCIissupported

BIOSisupgradeable

BIOS shadowingisallowed

ESCD supportisavailable

BootfromCDissupported

Selectablebootissupported

BIOS ROMissocketed

EDDissupported

5.25"/1.2 MB floppy services are supported (int 13h)

3.5"/720kB 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

好了,就是这样。

0b1331709591d260c1c78e86d0c51c18.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值