订阅本站
收藏本站
微博分享
QQ空间分享

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

alen 分类:教程 评论: 加入收藏

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

 

什么是 dmidecode?

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

 

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

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

在基于Deb的系统中安装

  1. sudo apt-get install dmidecode

在基于RPM的系统中安装

  1. sudo yum install dmidecode

在SUSE/openSUSE中安装

  1. sudo zypper in dmidecode

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

  1. sudo dmidecode -t 16

输出样本

  1. # dmidecode 2.12
  2. SMBIOS 2.6 present.
  3. Handle0x0014, DMI type 16,15 bytes
  4. PhysicalMemoryArray
  5. Location:SystemBoardOrMotherboard
  6. Use:SystemMemory
  7. ErrorCorrectionType:None
  8. MaximumCapacity:16 GB
  9. ErrorInformationHandle:NotProvided
  10. NumberOfDevices:2

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

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

  1. sudo dmidecode -t 17

输出样本

  1. # dmidecode 2.12
  2. SMBIOS 2.6 present.
  3. Handle0x0017, DMI type 17,28 bytes
  4. MemoryDevice
  5. ArrayHandle:0x0014
  6. ErrorInformationHandle:0x0000
  7. TotalWidth:Unknown
  8. DataWidth:Unknown
  9. Size:NoModuleInstalled
  10. FormFactor: DIMM
  11. Set:None
  12. Locator: DIMM_B
  13. BankLocator: BANK 2
  14. Type:Unknown
  15. TypeDetail:None
  16. Speed:Unknown
  17. Manufacturer:NotSpecified
  18. SerialNumber:NotSpecified
  19. AssetTag:NotSpecified
  20. PartNumber:NotSpecified
  21. Rank:Unknown
  22. Handle0x0015, DMI type 17,28 bytes
  23. MemoryDevice
  24. ArrayHandle:0x0014
  25. ErrorInformationHandle:0x0000
  26. TotalWidth:64 bits
  27. DataWidth:64 bits
  28. Size:4096 MB
  29. FormFactor: SODIMM
  30. Set:None
  31. Locator: DIMM_A
  32. BankLocator: BANK 0
  33. Type: DDR3
  34. TypeDetail:Synchronous
  35. Speed:1067MHz
  36. Manufacturer:014F
  37. SerialNumber:00092AF2
  38. AssetTag:54114000
  39. PartNumber: JM1066KSN-4G
  40. Rank:Unknown

就像上边输出的一样,我在插槽1里边安装了一个内存条。内存大小为4G,类型为DDR3,速度为1067 MHz

同样的,我们可以通过下边命令得到完整的内存信息。

  1. sudo dmidecode -t memory
  2. sudo dmidecode -t memory | less
  3. sudo dmidecode -t memory | more

输出样本

  1. # dmidecode 2.12
  2. SMBIOS 2.6 present.
  3. Handle0x0014, DMI type 16,15 bytes
  4. PhysicalMemoryArray
  5. Location:SystemBoardOrMotherboard
  6. Use:SystemMemory
  7. ErrorCorrectionType:None
  8. MaximumCapacity:16 GB
  9. ErrorInformationHandle:NotProvided
  10. NumberOfDevices:2
  11. Handle0x0017, DMI type 17,28 bytes
  12. MemoryDevice
  13. ArrayHandle:0x0014
  14. ErrorInformationHandle:0x0000
  15. TotalWidth:Unknown
  16. DataWidth:Unknown
  17. Size:NoModuleInstalled
  18. FormFactor: DIMM
  19. Set:None
  20. Locator: DIMM_B
  21. BankLocator: BANK 2
  22. Type:Unknown
  23. TypeDetail:None
  24. Speed:Unknown
  25. Manufacturer:NotSpecified
  26. SerialNumber:NotSpecified
  27. AssetTag:NotSpecified
  28. PartNumber:NotSpecified
  29. Rank:Unknown
  30. Handle0x0015, DMI type 17,28 bytes
  31. MemoryDevice
  32. ArrayHandle:0x0014
  33. ErrorInformationHandle:0x0000
  34. TotalWidth:64 bits
  35. DataWidth:64 bits
  36. Size:4096 MB
  37. FormFactor: SODIMM
  38. Set:None
  39. Locator: DIMM_A
  40. BankLocator: BANK 0
  41. Type: DDR3
  42. TypeDetail:Synchronous
  43. Speed:1067MHz
  44. Manufacturer:014F
  45. SerialNumber:00092AF2
  46. AssetTag:54114000
  47. PartNumber: JM1066KSN-4G
  48. Rank:Unknown

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

sudo dmidecode

输出样本

  1. # dmidecode 2.12
  2. SMBIOS 2.6 present.
  3. 48 structures occupying 2173 bytes.
  4. Table at 0x000EB840.
  5. Handle0xDA00, DMI type 218,251 bytes
  6. OEM-specific Type
  7. HeaderandData:
  8. DA FB 00 DA B2 000D5F0F37407D00000000
  9. 007E0001000000 DC 0100800200 DD 0100
  10. 8003007501018001007601028001002D
  11. 01038001002E01038000008101078000
  12. 00820107800100830108800000840108
  13. 80010085010680000086010680010058
  14. 02058000005702058001009C00020001
  15. 009B00020000008A0103000100890103
  16. 0000007F010400000080010400010053
  17. 01050000005201050001007B01060000
  18. 007C0106000100940107000000930107
  19. 0001007D00080000002D00090001002E
  20. 00090000006E000A00000095000B0001
  21. 0096000B0000002F020C00010030020C
  22. 00000050020D00000051020D00010052
  23. 020D000200 FF FF 00000000
  24. Handle0xDA01, DMI type 218,59 bytes
  25. OEM-specific Type
  26. HeaderandData:
  27. DA 3B01 DA B2 000D5F0F374053020D0003
  28. 0054020D00040056020D0005004B010E
  29. 0001004A010E000000 EA 000F000100 EB
  30. 000F000000 FF FF 00000000
  31. Handle0x0004, DMI type 4,42 bytes
  32. ProcessorInformation
  33. SocketDesignation: CPU 1
  34. Type:CentralProcessor
  35. Family:Core i3
  36. Manufacturer:Intel
  37. ID: A7 060301 FF FB AB BE
  38. Signature:Type0,Family6,Model42,Stepping7
  39. Flags:
  40. FPU (Floating-point unit on-chip)
  41. VME (Virtual mode extension)
  42. DE (Debugging extension)
  43. PSE (Page size extension)
  44. TSC (Time stamp counter)
  45. MSR (Model specific registers)
  46. PAE (Physical address extension)
  47. MCE (Machine check exception)
  48. CX8 (CMPXCHG8 instruction supported)
  49. APIC (On-chip APIC hardware supported)
  50. SEP (Fast system call)
  51. MTRR (Memory type range registers)
  52. PGE (Pageglobal enable)
  53. MCA (Machine check architecture)
  54. CMOV (Conditional move instruction supported)
  55. PAT (Page attribute table)
  56. PSE-36(36-bit page size extension)
  57. CLFSH (CLFLUSH instruction supported)
  58. DS (Debug store)
  59. ACPI (ACPI supported)
  60. MMX (MMX technology supported)
  61. FXSR (FXSAVE and FXSTOR instructions supported)
  62. SSE (Streaming SIMD extensions)
  63. SSE2 (Streaming SIMD extensions 2)
  64. SS (Self-snoop)
  65. HTT (Multi-threading)
  66. TM (Thermal monitor supported)
  67. PBE (Pendingbreak enabled)
  68. Version:Intel(R)Core(TM) i3-2350M CPU @2.30GHz
  69. Voltage:1.1 V
  70. ExternalClock:100MHz
  71. MaxSpeed:2300MHz
  72. CurrentSpeed:2300MHz
  73. Status:Populated,Enabled
  74. Upgrade:Other
  75. L1 CacheHandle:0x0005
  76. L2 CacheHandle:0x0006
  77. L3 CacheHandle:0x0007
  78. SerialNumber:ToBeFilledBy O.E.M.
  79. AssetTag:ToBeFilledBy O.E.M.
  80. PartNumber:ToBeFilledBy O.E.M.
  81. CoreCount:2
  82. CoreEnabled:1
  83. ThreadCount:2
  84. Characteristics:
  85. 64-bit capable
  86. Handle0x0005, DMI type 7,19 bytes
  87. CacheInformation
  88. SocketDesignation: L1-Cache
  89. Configuration:Enabled,NotSocketed,Level1
  90. OperationalMode:WriteBack
  91. Location:Internal
  92. InstalledSize:64 kB
  93. MaximumSize:64 kB
  94. Supported SRAM Types:
  95. Other
  96. Installed SRAM Type:Other
  97. Speed:Unknown
  98. ErrorCorrectionType:None
  99. SystemType:Unified
  100. Associativity:8-way Set-associative
  101. Handle0x0006, DMI type 7,19 bytes
  102. CacheInformation
  103. SocketDesignation: L2-Cache
  104. Configuration:Enabled,NotSocketed,Level2
  105. OperationalMode:VariesWithMemoryAddress
  106. Location:Internal
  107. InstalledSize:512 kB
  108. MaximumSize:512 kB
  109. Supported SRAM Types:
  110. Other
  111. Installed SRAM Type:Other
  112. Speed:Unknown
  113. ErrorCorrectionType:None
  114. SystemType:Unified
  115. Associativity:8-way Set-associative
  116. Handle0x0007, DMI type 7,19 bytes
  117. CacheInformation
  118. SocketDesignation: L3-Cache
  119. Configuration:Enabled,NotSocketed,Level3
  120. OperationalMode:VariesWithMemoryAddress
  121. Location:Internal
  122. InstalledSize:3072 kB
  123. MaximumSize:3072 kB
  124. Supported SRAM Types:
  125. Other
  126. Installed SRAM Type:Other
  127. Speed:Unknown
  128. ErrorCorrectionType:None
  129. SystemType:Unified
  130. Associativity:Other
  131. Handle0x0008, DMI type 8,9 bytes
  132. PortConnectorInformation
  133. InternalReferenceDesignator: J1A1
  134. InternalConnectorType:None
  135. ExternalReferenceDesignator: PS2Mouse
  136. ExternalConnectorType: PS/2
  137. PortType:MousePort
  138. Handle0x0009, DMI type 8,9 bytes
  139. PortConnectorInformation
  140. InternalReferenceDesignator: J1A1
  141. InternalConnectorType:None
  142. ExternalReferenceDesignator:Keyboard
  143. ExternalConnectorType: PS/2
  144. PortType:KeyboardPort
  145. Handle0x000A, DMI type 8,9 bytes
  146. PortConnectorInformation
  147. InternalReferenceDesignator: J2A2B
  148. InternalConnectorType:None
  149. ExternalReferenceDesignator:Video
  150. ExternalConnectorType: DB-15 female
  151. PortType:VideoPort
  152. Handle0x000B, DMI type 8,9 bytes
  153. PortConnectorInformation
  154. InternalReferenceDesignator: J3A1
  155. InternalConnectorType:None
  156. ExternalReferenceDesignator: USB1
  157. ExternalConnectorType:AccessBus(USB)
  158. PortType: USB
  159. Handle0x000C, DMI type 8,9 bytes
  160. PortConnectorInformation
  161. InternalReferenceDesignator: J3A1
  162. InternalConnectorType:None
  163. ExternalReferenceDesignator: USB2
  164. ExternalConnectorType:AccessBus(USB)
  165. PortType: USB
  166. Handle0x000D, DMI type 8,9 bytes
  167. PortConnectorInformation
  168. InternalReferenceDesignator: J3A1
  169. InternalConnectorType:None
  170. ExternalReferenceDesignator: USB3
  171. ExternalConnectorType:AccessBus(USB)
  172. PortType: USB
  173. Handle0x000E, DMI type 8,9 bytes
  174. PortConnectorInformation
  175. InternalReferenceDesignator: J5A1
  176. InternalConnectorType:None
  177. ExternalReferenceDesignator: LAN
  178. ExternalConnectorType: RJ-45
  179. PortType:NetworkPort
  180. Handle0x000F, DMI type 9,17 bytes
  181. SystemSlotInformation
  182. Designation: J6B2
  183. Type: x16 PCI Express
  184. CurrentUsage:InUse
  185. Length:Long
  186. ID:0
  187. Characteristics:
  188. 3.3 V is provided
  189. Openingis shared
  190. PME signal is supported
  191. BusAddress:0000:00:01.0
  192. Handle0x0010, DMI type 9,17 bytes
  193. SystemSlotInformation
  194. Designation: J6B1
  195. Type: x1 PCI Express
  196. CurrentUsage:InUse
  197. Length:Short
  198. ID:1
  199. Characteristics:
  200. 3.3 V is provided
  201. Openingis shared
  202. PME signal is supported
  203. BusAddress:0000:00:1c.3
  204. Handle0x0012, DMI type 11,5 bytes
  205. OEM Strings
  206. String1:DellSystem
  207. String2:5[0003]
  208. String3:13[P18F]
  209. Handle0x0013, DMI type 12,5 bytes
  210. SystemConfigurationOptions
  211. Option1:ToBeFilledBy O.E.M.
  212. Handle0x001C, DMI type 21,7 bytes
  213. Built-inPointingDevice
  214. Type:TouchPad
  215. Interface:BusMouse
  216. Buttons:2
  217. Handle0x001D, DMI type 22,26 bytes
  218. PortableBattery
  219. Location:Sys.BatteryBay
  220. Manufacturer:Sanyo
  221. SerialNumber:5390
  222. Name: DELL 4YRJH22
  223. Chemistry:LithiumIon
  224. DesignCapacity:45000 mWh
  225. DesignVoltage:10800 mV
  226. SBDS Version:1.0
  227. MaximumError:2%
  228. SBDS ManufactureDate:2012-02-28
  229. OEM-specific Information:0x00000001
  230. Handle0x001E, DMI type 32,20 bytes
  231. SystemBootInformation
  232. Status:No errors detected
  233. Handle0x0020, DMI type 27,12 bytes
  234. CoolingDevice
  235. Type:Fan
  236. Status: OK
  237. OEM-specific Information:0x00000000
  238. Handle0x0021, DMI type 28,20 bytes
  239. TemperatureProbe
  240. Description: CPU InternalTemperature
  241. Location:Processor
  242. Status: OK
  243. MaximumValue:127.0 deg C
  244. MinimumValue:0.0 deg C
  245. Resolution:1.000 deg C
  246. Tolerance:0.5 deg C
  247. Accuracy:Unknown
  248. OEM-specific Information:0x00000000
  249. Handle0xB000, DMI type 176,5 bytes
  250. OEM-specific Type
  251. HeaderandData:
  252. B0 0500 B0 00
  253. Handle0xB100, DMI type 177,12 bytes
  254. OEM-specific Type
  255. HeaderandData:
  256. B1 0C00 B1 1A0E000000000000
  257. Handle0x0025, DMI type 209,12 bytes
  258. OEM-specific Type
  259. HeaderandData:
  260. D1 0C25000000000305010003
  261. Handle0x0026, DMI type 210,12 bytes
  262. OEM-specific Type
  263. HeaderandData:
  264. D2 0C26000000000305200103
  265. Handle0x0027, DMI type 211,13 bytes
  266. OEM-specific Type
  267. HeaderandData:
  268. D3 0D2700010000000002030404
  269. Strings:
  270. Front
  271. Handle0x0028, DMI type 212,57 bytes
  272. OEM-specific Type
  273. HeaderandData:
  274. D4 39280070007100014950489C0049 FC
  275. 019B0049 FC 007F014A FB 0480014A FB 00
  276. 53014A F7 0852014A F7 087B014A EF 107C
  277. 014A EF 10 FF FF 000000
  278. Handle0x002A, DMI type 217,8 bytes
  279. OEM-specific Type
  280. HeaderandData:
  281. D9 082A0001020000
  282. Strings:
  283. Handle0x002B, DMI type 219,11 bytes
  284. OEM-specific Type
  285. HeaderandData:
  286. DB 0B2B0000010203000405
  287. Strings:
  288. Handle0x002C, DMI type 220,22 bytes
  289. OEM-specific Type
  290. HeaderandData:
  291. DC 162C0001 F0 000002 F0 0000000003 F0
  292. 04 F0 00000000
  293. Handle0x002D, DMI type 221,19 bytes
  294. OEM-specific Type
  295. HeaderandData:
  296. DD 132D00000000000003000000000000
  297. 000000
  298. Handle0x002E, DMI type 222,16 bytes
  299. OEM-specific Type
  300. HeaderandData:
  301. DE 102E000108 FF FF 0000000000000000
  302. Handle0x0014, DMI type 16,15 bytes
  303. PhysicalMemoryArray
  304. Location:SystemBoardOrMotherboard
  305. Use:SystemMemory
  306. ErrorCorrectionType:None
  307. MaximumCapacity:16 GB
  308. ErrorInformationHandle:NotProvided
  309. NumberOfDevices:2
  310. Handle0x0016, DMI type 20,19 bytes
  311. MemoryDeviceMappedAddress
  312. StartingAddress:0x00000000000
  313. EndingAddress:0x000FFFFFFFF
  314. RangeSize:4 GB
  315. PhysicalDeviceHandle:0x0015
  316. MemoryArrayMappedAddressHandle:0x0018
  317. PartitionRowPosition:1
  318. InterleavePosition:1
  319. InterleavedDataDepth:1
  320. Handle0x0017, DMI type 17,28 bytes
  321. MemoryDevice
  322. ArrayHandle:0x0014
  323. ErrorInformationHandle:0x0000
  324. TotalWidth:Unknown
  325. DataWidth:Unknown
  326. Size:NoModuleInstalled
  327. FormFactor: DIMM
  328. Set:None
  329. Locator: DIMM_B
  330. BankLocator: BANK 2
  331. Type:Unknown
  332. TypeDetail:None
  333. Speed:Unknown
  334. Manufacturer:NotSpecified
  335. SerialNumber:NotSpecified
  336. AssetTag:NotSpecified
  337. PartNumber:NotSpecified
  338. Rank:Unknown
  339. Handle0x0018, DMI type 19,15 bytes
  340. MemoryArrayMappedAddress
  341. StartingAddress:0x00000000000
  342. EndingAddress:0x000FFFFFFFF
  343. RangeSize:4 GB
  344. PhysicalArrayHandle:0x0014
  345. PartitionWidth:2
  346. Handle0x002F, DMI type 13,22 bytes
  347. BIOS LanguageInformation
  348. LanguageDescriptionFormat:Abbreviated
  349. InstallableLanguages:1
  350. eng
  351. CurrentlyInstalledLanguage: eng
  352. Handle0x0030, DMI type 131,64 bytes
  353. OEM-specific Type
  354. HeaderandData:
  355. 83403000310000000000000000000000
  356. F8 004B1C FF FF FF FF 0100000000000700
  357. AD 04040000000000 C8 00 FF FF 00000000
  358. 00000000320000007650726F00000000
  359. Handle0x0029, DMI type 216,9 bytes
  360. OEM-specific Type
  361. HeaderandData:
  362. D8 0929000102010000
  363. Strings:
  364. INTEL
  365. 0000
  366. Handle0x0000, DMI type 0,24 bytes
  367. BIOS Information
  368. Vendor:DellInc.
  369. Version: A05
  370. ReleaseDate:08/03/2012
  371. Address:0xF0000
  372. RuntimeSize:64 kB
  373. ROM Size:2048 kB
  374. Characteristics:
  375. MCA is supported
  376. PCI is supported
  377. BIOS is upgradeable
  378. BIOS shadowing is allowed
  379. ESCD support is available
  380. Bootfrom CD is supported
  381. Selectable boot is supported
  382. BIOS ROM is socketed
  383. EDD is supported
  384. 5.25"/1.2 MB floppy services are supported (int 13h)
  385. 3.5"/720 kB floppy services are supported (int13h)
  386. 3.5"/2.88 MB floppy services are supported (int 13h)
  387. Print screen service is supported (int 5h)
  388. 8042 keyboard services are supported (int 9h)
  389. Serial services are supported (int 14h)
  390. Printer services are supported (int 17h)
  391. CGA/mono video services are supported (int 10h)
  392. ACPI is supported
  393. USB legacy is supported
  394. ATAPI Zip drive boot is supported
  395. BIOS boot specification is supported
  396. Targeted content distribution is supported
  397. BIOS Revision: 0.5
  398. Firmware Revision: 0.5
  399. Handle 0x0002, DMI type 2, 15 bytes
  400. Base Board Information
  401. Manufacturer: Dell Inc.
  402. Product Name: 01HXXJ
  403. Version: A05
  404. Serial Number: .JSQ7PA1.CN7117623M00J2.
  405. Asset Tag: Not Specified
  406. Features:
  407. Board is a hosting board
  408. Board is replaceable
  409. Location In Chassis: To Be Filled By O.E.M.
  410. Chassis Handle: 0x0003
  411. Type: Motherboard
  412. Contained Object Handles: 0
  413. Handle 0x0003, DMI type 3, 21 bytes
  414. Chassis Information
  415. Manufacturer: Dell Inc.
  416. Type: Portable
  417. Lock: Not Present
  418. Version: Not Specified
  419. Serial Number: JSR1
  420. Asset Tag: Not Specified
  421. Boot-up State: Safe
  422. Power Supply State: Safe
  423. Thermal State: Safe
  424. Security Status: None
  425. OEM Information: 0x00000000
  426. Height: Unspecified
  427. Number Of Power Cords: 1
  428. Contained Elements: 0
  429. Handle 0x0001, DMI type 1, 27 bytes
  430. System Information
  431. Manufacturer: Dell Inc.
  432. Product Name: Inspiron N5050
  433. Version: Not Specified
  434. Serial Number: JSR1
  435. UUID: 4C4C4544-0053-5110-8029-CAC05241
  436. Wake-up Type: Power Switch
  437. SKU Number: To be filled by O.E.M.
  438. Family:
  439. Handle 0x0024, DMI type 208, 12 bytes
  440. OEM-specific Type
  441. Header and Data:
  442. D0 0C 24 00 02 05 FE 00 04 05 01 02
  443. Strings:
  444. 20120323
  445. 20120323
  446. Handle 0x0011, DMI type 10, 6 bytes
  447. On Board Device Information
  448. Type: Video
  449. Status: Enabled
  450. Description: Mobile Intel SandyBridge HD Graphics
  451. Handle 0x0015, DMI type 17, 28 bytes
  452. Memory Device
  453. Array Handle: 0x0014
  454. Error Information Handle: 0x0000
  455. Total Width: 64 bits
  456. Data Width: 64 bits
  457. Size: 4096 MB
  458. Form Factor: SODIMM
  459. Set: None
  460. Locator: DIMM_A
  461. Bank Locator: BANK 0
  462. Type: DDR3
  463. Type Detail: Synchronous
  464. Speed: 1067 MHz
  465. Manufacturer: 014F
  466. Serial Number: 0009F2
  467. Asset Tag: 54114000
  468. Part Number: JM1066-4G
  469. Rank: Unknown
  470. Handle 0x0031, DMI type 127, 4 bytes
  471. End Of Table

好了,就是这样。

本文永久更新链接地址:http://www.linuxidc.com/Linux/2015-03/115618.htm

linux

TAG:

文章评论

留言与评论(共有 0 条评论)
   
验证码: