Linux中如何找出系統所支援的最大記憶體
大多數情況下你可以從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. Handle 0x0014, DMI type 16, 15 bytes Physical Memory Array Location: System Board Or Motherboard Use: System Memory Error Correction Type: None Maximum Capacity: 16 GB Error Information Handle: Not Provided Number Of Devices: 2
就像你看到的,我的系統支援最大記憶體到16G,並且有兩個記憶體插槽,簡單吧?
接下來,讓我們找出現在已經安裝的記憶體的詳細資訊。
sudo dmidecode -t 17
輸出樣本
# dmidecode 2.12 SMBIOS 2.6 present. Handle 0x0017, DMI type 17, 28 bytes Memory Device Array Handle: 0x0014 Error Information Handle: 0x0000 Total Width: Unknown Data Width: Unknown Size: No Module Installed Form Factor: DIMM Set: None Locator: DIMM_B Bank Locator: BANK 2 Type: Unknown Type Detail: None Speed: Unknown Manufacturer: Not Specified Serial Number: Not Specified Asset Tag: Not Specified Part Number: Not Specified Rank: Unknown 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: 00092AF2 Asset Tag: 54114000 Part Number: 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. Handle 0x0014, DMI type 16, 15 bytes Physical Memory Array Location: System Board Or Motherboard Use: System Memory Error Correction Type: None Maximum Capacity: 16 GB Error Information Handle: Not Provided Number Of Devices: 2 Handle 0x0017, DMI type 17, 28 bytes Memory Device Array Handle: 0x0014 Error Information Handle: 0x0000 Total Width: Unknown Data Width: Unknown Size: No Module Installed Form Factor: DIMM Set: None Locator: DIMM_B Bank Locator: BANK 2 Type: Unknown Type Detail: None Speed: Unknown Manufacturer: Not Specified Serial Number: Not Specified Asset Tag: Not Specified Part Number: Not Specified Rank: Unknown 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: 00092AF2 Asset Tag: 54114000 Part Number: JM1066KSN-4G Rank: Unknown
如果你好奇想要知道整個系統的詳細資訊,例如主機板、記憶體、BIOS等,那麼可以輸入以下命令來獲取。
sudo dmidecode
輸出樣本
# dmidecode 2.12 SMBIOS 2.6 present. 48 structures occupying 2173 bytes. Table at 0x000EB840.
Handle 0xDA00, DMI type 218, 251 bytes OEM-specific Type Header and Data: DA FB 00 DA B2 00 0D 5F 0F 37 40 7D 00 00 00 00 00 7E 00 01 00 00 00 DC 01 00 80 02 00 DD 01 00 80 03 00 75 01 01 80 01 00 76 01 02 80 01 00 2D 01 03 80 01 00 2E 01 03 80 00 00 81 01 07 80 00 00 82 01 07 80 01 00 83 01 08 80 00 00 84 01 08 80 01 00 85 01 06 80 00 00 86 01 06 80 01 00 58 02 05 80 00 00 57 02 05 80 01 00 9C 00 02 00 01 00 9B 00 02 00 00 00 8A 01 03 00 01 00 89 01 03 00 00 00 7F 01 04 00 00 00 80 01 04 00 01 00 53 01 05 00 00 00 52 01 05 00 01 00 7B 01 06 00 00 00 7C 01 06 00 01 00 94 01 07 00 00 00 93 01 07 00 01 00 7D 00 08 00 00 00 2D 00 09 00 01 00 2E 00 09 00 00 00 6E 00 0A 00 00 00 95 00 0B 00 01 00 96 00 0B 00 00 00 2F 02 0C 00 01 00 30 02 0C 00 00 00 50 02 0D 00 00 00 51 02 0D 00 01 00 52 02 0D 00 02 00 FF FF 00 00 00 00 Handle 0xDA01, DMI type 218, 59 bytes OEM-specific Type Header and Data: DA 3B 01 DA B2 00 0D 5F 0F 37 40 53 02 0D 00 03 00 54 02 0D 00 04 00 56 02 0D 00 05 00 4B 01 0E 00 01 00 4A 01 0E 00 00 00 EA 00 0F 00 01 00 EB 00 0F 00 00 00 FF FF 00 00 00 00 Handle 0x0004, DMI type 4, 42 bytes Processor Information Socket Designation: CPU 1 Type: Central Processor Family: Core i3 Manufacturer: Intel ID: A7 06 03 01 FF FB AB BE Signature: Type 0, Family 6, Model 42, Stepping 7 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 (Page global 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 (Pending break enabled) Version: Intel(R) Core(TM) i3-2350M CPU @ 2.30GHz Voltage: 1.1 V External Clock: 100 MHz Max Speed: 2300 MHz Current Speed: 2300 MHz Status: Populated, Enabled Upgrade: Other L1 Cache Handle: 0x0005 L2 Cache Handle: 0x0006 L3 Cache Handle: 0x0007 Serial Number: To Be Filled By O.E.M. Asset Tag: To Be Filled By O.E.M. Part Number: To Be Filled By O.E.M. Core Count: 2 Core Enabled: 1 Thread Count: 2 Characteristics: 64-bit capable Handle 0x0005, DMI type 7, 19 bytes Cache Information Socket Designation: L1-Cache Configuration: Enabled, Not Socketed, Level 1 Operational Mode: Write Back Location: Internal Installed Size: 64 kB Maximum Size: 64 kB Supported SRAM Types: Other Installed SRAM Type: Other Speed: Unknown Error Correction Type: None System Type: Unified Associativity: 8-way Set-associative Handle 0x0006, DMI type 7, 19 bytes Cache Information Socket Designation: L2-Cache Configuration: Enabled, Not Socketed, Level 2 Operational Mode: Varies With Memory Address Location: Internal Installed Size: 512 kB Maximum Size: 512 kB Supported SRAM Types: Other Installed SRAM Type: Other Speed: Unknown Error Correction Type: None System Type: Unified Associativity: 8-way Set-associative Handle 0x0007, DMI type 7, 19 bytes Cache Information Socket Designation: L3-Cache Configuration: Enabled, Not Socketed, Level 3 Operational Mode: Varies With Memory Address Location: Internal Installed Size: 3072 kB Maximum Size: 3072 kB Supported SRAM Types: Other Installed SRAM Type: Other Speed: Unknown Error Correction Type: None System Type: Unified Associativity: Other Handle 0x0008, DMI type 8, 9 bytes Port Connector Information Internal Reference Designator: J1A1 Internal Connector Type: None External Reference Designator: PS2Mouse External Connector Type: PS/2 Port Type: Mouse Port Handle 0x0009, DMI type 8, 9 bytes Port Connector Information Internal Reference Designator: J1A1 Internal Connector Type: None External Reference Designator: Keyboard External Connector Type: PS/2 Port Type: Keyboard Port Handle 0x000A, DMI type 8, 9 bytes Port Connector Information Internal Reference Designator: J2A2B Internal Connector Type: None External Reference Designator: Video External Connector Type: DB-15 female Port Type: Video Port Handle 0x000B, DMI type 8, 9 bytes Port Connector Information Internal Reference Designator: J3A1 Internal Connector Type: None External Reference Designator: USB1 External Connector Type: Access Bus (USB) Port Type: USB Handle 0x000C, DMI type 8, 9 bytes Port Connector Information Internal Reference Designator: J3A1 Internal Connector Type: None External Reference Designator: USB2 External Connector Type: Access Bus (USB) Port Type: USB Handle 0x000D, DMI type 8, 9 bytes Port Connector Information Internal Reference Designator: J3A1 Internal Connector Type: None External Reference Designator: USB3 External Connector Type: Access Bus (USB) Port Type: USB Handle 0x000E, DMI type 8, 9 bytes Port Connector Information Internal Reference Designator: J5A1 Internal Connector Type: None External Reference Designator: LAN External Connector Type: RJ-45 Port Type: Network Port Handle 0x000F, DMI type 9, 17 bytes System Slot Information Designation: J6B2 Type: x16 PCI Express Current Usage: In Use Length: Long ID: 0 Characteristics: 3.3 V is provided Opening is shared PME signal is supported Bus Address: 0000:00:01.0 Handle 0x0010, DMI type 9, 17 bytes System Slot Information Designation: J6B1 Type: x1 PCI Express Current Usage: In Use Length: Short ID: 1 Characteristics: 3.3 V is provided Opening is shared PME signal is supported Bus Address: 0000:00:1c.3 Handle 0x0012, DMI type 11, 5 bytes OEM Strings String 1: Dell System String 2: 5[0003] String 3: 13[P18F] Handle 0x0013, DMI type 12, 5 bytes System Configuration Options Option 1: To Be Filled By O.E.M. Handle 0x001C, DMI type 21, 7 bytes Built-in Pointing Device Type: Touch Pad Interface: Bus Mouse Buttons: 2 Handle 0x001D, DMI type 22, 26 bytes Portable Battery Location: Sys. Battery Bay Manufacturer: Sanyo Serial Number: 5390 Name: DELL 4YRJH22 Chemistry: Lithium Ion Design Capacity: 45000 mWh Design Voltage: 10800 mV SBDS Version: 1.0 Maximum Error: 2% SBDS Manufacture Date: 2012-02-28 OEM-specific Information: 0x00000001 Handle 0x001E, DMI type 32, 20 bytes System Boot Information Status: No errors detected Handle 0x0020, DMI type 27, 12 bytes Cooling Device Type: Fan Status: OK OEM-specific Information: 0x00000000 Handle 0x0021, DMI type 28, 20 bytes Temperature Probe Description: CPU Internal Temperature Location: Processor Status: OK Maximum Value: 127.0 deg C Minimum Value: 0.0 deg C Resolution: 1.000 deg C Tolerance: 0.5 deg C Accuracy: Unknown OEM-specific Information: 0x00000000 Handle 0xB000, DMI type 176, 5 bytes OEM-specific Type Header and Data: B0 05 00 B0 00 Handle 0xB100, DMI type 177, 12 bytes OEM-specific Type Header and Data: B1 0C 00 B1 1A 0E 00 00 00 00 00 00 Handle 0x0025, DMI type 209, 12 bytes OEM-specific Type Header and Data: D1 0C 25 00 00 00 00 03 05 01 00 03 Handle 0x0026, DMI type 210, 12 bytes OEM-specific Type Header and Data: D2 0C 26 00 00 00 00 03 05 20 01 03 Handle 0x0027, DMI type 211, 13 bytes OEM-specific Type Header and Data: D3 0D 27 00 01 00 00 00 00 02 03 04 04 Strings: Front Handle 0x0028, DMI type 212, 57 bytes OEM-specific Type Header and Data: D4 39 28 00 70 00 71 00 01 49 50 48 9C 00 49 FC 01 9B 00 49 FC 00 7F 01 4A FB 04 80 01 4A FB 00 53 01 4A F7 08 52 01 4A F7 08 7B 01 4A EF 10 7C 01 4A EF 10 FF FF 00 00 00 Handle 0x002A, DMI type 217, 8 bytes OEM-specific Type Header and Data: D9 08 2A 00 01 02 00 00 Strings: Handle 0x002B, DMI type 219, 11 bytes OEM-specific Type Header and Data: DB 0B 2B 00 00 01 02 03 00 04 05 Strings: Handle 0x002C, DMI type 220, 22 bytes OEM-specific Type Header and Data: DC 16 2C 00 01 F0 00 00 02 F0 00 00 00 00 03 F0 04 F0 00 00 00 00 Handle 0x002D, DMI type 221, 19 bytes OEM-specific Type Header and Data: DD 13 2D 00 00 00 00 00 00 03 00 00 00 00 00 00 00 00 00 Handle 0x002E, DMI type 222, 16 bytes OEM-specific Type Header and Data: DE 10 2E 00 01 08 FF FF 00 00 00 00 00 00 00 00 Handle 0x0014, DMI type 16, 15 bytes Physical Memory Array Location: System Board Or Motherboard Use: System Memory Error Correction Type: None Maximum Capacity: 16 GB Error Information Handle: Not Provided Number Of Devices: 2 Handle 0x0016, DMI type 20, 19 bytes Memory Device Mapped Address Starting Address: 0x00000000000 Ending Address: 0x000FFFFFFFF Range Size: 4 GB Physical Device Handle: 0x0015 Memory Array Mapped Address Handle: 0x0018 Partition Row Position: 1 Interleave Position: 1 Interleaved Data Depth: 1 Handle 0x0017, DMI type 17, 28 bytes Memory Device Array Handle: 0x0014 Error Information Handle: 0x0000 Total Width: Unknown Data Width: Unknown Size: No Module Installed Form Factor: DIMM Set: None Locator: DIMM_B Bank Locator: BANK 2 Type: Unknown Type Detail: None Speed: Unknown Manufacturer: Not Specified Serial Number: Not Specified Asset Tag: Not Specified Part Number: Not Specified Rank: Unknown Handle 0x0018, DMI type 19, 15 bytes Memory Array Mapped Address Starting Address: 0x00000000000 Ending Address: 0x000FFFFFFFF Range Size: 4 GB Physical Array Handle: 0x0014 Partition Width: 2 Handle 0x002F, DMI type 13, 22 bytes BIOS Language Information Language Description Format: Abbre
相關文章
- 如何在 Linux 中找出記憶體消耗最大的程序Linux記憶體
- 如何在無響應的Linux系統中殺掉記憶體消耗最大的程式Linux記憶體
- win10 64位最大支援記憶體是多少_win10系統最高支援多大記憶體Win10記憶體
- Linux下找出吃記憶體的方法總結Linux記憶體
- 如何檢視linux系統中空閒記憶體/實體記憶體使用/剩餘記憶體Linux記憶體
- 查詢windows記憶體卡槽及卡槽支援的最大記憶體Windows記憶體
- 在Linux中,如何檢查系統的CPU和記憶體使用情況?Linux記憶體
- Linux記憶體子系統——Locking Pages(記憶體鎖定)Linux記憶體
- 如何在 Linux 系統中判斷安裝、使用了多少記憶體Linux記憶體
- Linux作業系統記憶體淺析Linux作業系統記憶體
- 32bit的linux系統記憶體分佈Linux記憶體
- 32位win10系統支援多大記憶體_32位win10系統能識別多大記憶體Win10記憶體
- 在Linux中,如何檢視linux中記憶體使用率最高的程序?Linux記憶體
- mysql最大表記憶體MySql記憶體
- Linux系統程式設計—共享記憶體之mmapLinux程式設計記憶體
- Linux系統手動釋放記憶體快取Linux記憶體快取
- 利用 Shell 指令碼來監控 Linux 系統的記憶體指令碼Linux記憶體
- 虛擬記憶體系統——瞭解記憶體的工作原理記憶體
- MikroTik RouterOS x86最大記憶體只能支援2GROS記憶體
- 絕對牛逼哄哄的shellcode記憶體注入,支援64,32,遠端記憶體注入,支援VMP殼最大強度保護記憶體
- (2)Linux效能調優之Linux記憶體體系Linux記憶體
- linux記憶體管理(一)實體記憶體的組織和記憶體分配Linux記憶體
- 在Linux中,什麼是虛擬記憶體?它是如何工作的?Linux記憶體
- win10系統檢視哪個軟體佔用記憶體最大的圖文教程Win10記憶體
- windows10系統如何增加虛擬記憶體Windows記憶體
- 如何檢視Linux的記憶體使用狀況Linux記憶體
- Linux系統下分析記憶體使用情況的管理工具Linux記憶體
- Linux系統程式設計之命名管道與共享記憶體Linux程式設計記憶體
- linux查詢作業系統資訊(CPU、記憶體、硬碟)Linux作業系統記憶體硬碟
- Linux記憶體不夠了?看看如何開啟虛擬記憶體增加記憶體使用量Linux記憶體
- JS中的棧記憶體、堆記憶體JS記憶體
- Sieve—Android 記憶體分析系統Android記憶體
- 作業系統-記憶體管理作業系統記憶體
- 作業系統——記憶體管理作業系統記憶體
- Linux共享記憶體的管理Linux記憶體
- 在Docker中,如何控制容器佔用系統資源(CPU,記憶體)的份額?Docker記憶體
- [Linux]共享記憶體Linux記憶體
- MySQL記憶體管理,記憶體分配器和作業系統MySql記憶體作業系統
- 如何在 Linux 中找出 CPU 佔用高的程序Linux