Linux查看内存槽数量及使用情况

$ sudo lshw -class memory |grep memory 
  *-memory:0
  *-memory:1
  *-memory:2
  *-memory:3
  *-memory:4 UNCLAIMED
  *-memory:5 UNCLAIMED
$ sudo lshw -class memory |tee memory.txt

  *-firmware
       description: BIOS
       vendor: American Megatrends Inc.
       physical id: 0
       version: 2.0a
       date: 08/25/2016
       size: 64KiB
       capacity: 15MiB
       capabilities: pci upgrade shadowing cdboot bootselect socketedrom edd int13floppy1200 int13floppy720 int13floppy2880 int5printscreen int9keyboard int14serial int17printer acpi usb biosbootspecification uefi
  *-memory:0
       description: System Memory
       physical id: 2a
       slot: System board or motherboard
     *-bank:0
          description: DIMM Synchronous 2400 MHz (0.4 ns)
          product: 18ASF2G72PDZ-2G3B1
          vendor: Micron
          physical id: 0
          serial: 13711909
          slot: P1-DIMMA1
          size: 16GiB
          width: 64 bits
          clock: 2400MHz (0.4ns)
     *-bank:1
          description: DIMM Synchronous 2400 MHz (0.4 ns)
          product: 18ASF2G72PDZ-2G3B1
          vendor: Micron
          physical id: 1
          serial: 137119F5
          slot: P1-DIMMB1
          size: 16GiB
          width: 64 bits
          clock: 2400MHz (0.4ns)
  *-memory:1
       description: System Memory
       physical id: 2d
       slot: System board or motherboard
     *-bank:0
          description: DIMM Synchronous 2400 MHz (0.4 ns)
          product: 18ASF2G72PDZ-2G3B1
          vendor: Micron
          physical id: 0
          serial: 13711900
          slot: P1-DIMMC1
          size: 16GiB
          width: 64 bits
          clock: 2400MHz (0.4ns)
     *-bank:1
          description: DIMM Synchronous 2400 MHz (0.4 ns)
          product: 18ASF2G72PDZ-2G3B1
          vendor: Micron
          physical id: 1
          serial: 137118FF
          slot: P1-DIMMD1
          size: 16GiB
          width: 64 bits
          clock: 2400MHz (0.4ns)
  *-memory:2
       description: System Memory
       physical id: 30
       slot: System board or motherboard
     *-bank:0
          description: DIMM Synchronous 2400 MHz (0.4 ns)
          product: 18ASF2G72PDZ-2G3B1
          vendor: Micron
          physical id: 0
          serial: 13711907
          slot: P2-DIMME1
          size: 16GiB
          width: 64 bits
          clock: 2400MHz (0.4ns)
     *-bank:1
          description: DIMM Synchronous 2400 MHz (0.4 ns)
          product: 18ASF2G72PDZ-2G3B1
          vendor: Micron
          physical id: 1
          serial: 137119F2
          slot: P2-DIMMF1
          size: 16GiB
          width: 64 bits
          clock: 2400MHz (0.4ns)
  *-memory:3
       description: System Memory
       physical id: 33
       slot: System board or motherboard
     *-bank:0
          description: DIMM Synchronous 2400 MHz (0.4 ns)
          product: 18ASF2G72PDZ-2G3B1
          vendor: Micron
          physical id: 0
          serial: 137119F4
          slot: P2-DIMMG1
          size: 16GiB
          width: 64 bits
          clock: 2400MHz (0.4ns)
     *-bank:1
          description: DIMM Synchronous 2400 MHz (0.4 ns)
          product: 18ASF2G72PDZ-2G3B1
          vendor: Micron
          physical id: 1
          serial: 137119F3
          slot: P2-DIMMH1
          size: 16GiB
          width: 64 bits
          clock: 2400MHz (0.4ns)
  *-cache:0
       description: L1 cache
       physical id: 43
       slot: CPU Internal L1
       size: 896KiB
       capacity: 896KiB
       capabilities: internal write-back
       configuration: level=1
  *-cache:1
       description: L2 cache
       physical id: 44
       slot: CPU Internal L2
       size: 3584KiB
       capacity: 3584KiB
       capabilities: internal write-back unified
       configuration: level=2
  *-cache:2
       description: L3 cache
       physical id: 45
       slot: CPU Internal L3
       size: 35MiB
       capacity: 35MiB
       capabilities: internal write-back unified
       configuration: level=3
  *-cache:3
       description: L1 cache
       physical id: 47
       slot: CPU Internal L1
       size: 896KiB
       capacity: 896KiB
       capabilities: internal write-back
       configuration: level=1
  *-cache:4
       description: L2 cache
       physical id: 48
       slot: CPU Internal L2
       size: 3584KiB
       capacity: 3584KiB
       capabilities: internal write-back unified
       configuration: level=2
  *-cache:5
       description: L3 cache
       physical id: 49
       slot: CPU Internal L3
       size: 35MiB
       capacity: 35MiB
       capabilities: internal write-back unified
       configuration: level=3
  *-memory:4 UNCLAIMED
       physical id: 1
  *-memory:5 UNCLAIMED
       physical id: 2

$ sudo dmidecode -t memory |tee dmi.txt

# dmidecode 3.0
Getting SMBIOS data from sysfs.
SMBIOS 3.0 present.

Handle 0x002A, DMI type 16, 23 bytes
Physical Memory Array
    Location: System Board Or Motherboard
    Use: System Memory
    Error Correction Type: Multi-bit ECC
    Maximum Capacity: 128 GB
    Error Information Handle: Not Provided
    Number Of Devices: 2

Handle 0x002B, DMI type 17, 40 bytes
Memory Device
    Array Handle: 0x002A
    Error Information Handle: Not Provided
    Total Width: 72 bits
    Data Width: 64 bits
    Size: 16384 MB
    Form Factor: DIMM
    Set: None
    Locator: P1-DIMMA1
    Bank Locator: P0_Node0_Channel0_Dimm0
    Type: DDR4
    Type Detail: Synchronous
    Speed: 2400 MHz
    Manufacturer: Micron
    Serial Number: 13711909
    Asset Tag: P1-DIMMA1_AssetTag (date:16/31)
    Part Number: 18ASF2G72PDZ-2G3B1 
    Rank: 2
    Configured Clock Speed: 2400 MHz
    Minimum Voltage: Unknown
    Maximum Voltage: Unknown
    Configured Voltage: Unknown

Handle 0x002C, DMI type 17, 40 bytes
Memory Device
    Array Handle: 0x002A
    Error Information Handle: Not Provided
    Total Width: 72 bits
    Data Width: 64 bits
    Size: 16384 MB
    Form Factor: DIMM
    Set: None
    Locator: P1-DIMMB1
    Bank Locator: P0_Node0_Channel1_Dimm0
    Type: DDR4
    Type Detail: Synchronous
    Speed: 2400 MHz
    Manufacturer: Micron
    Serial Number: 137119F5
    Asset Tag: P1-DIMMB1_AssetTag (date:16/31)
    Part Number: 18ASF2G72PDZ-2G3B1 
    Rank: 2
    Configured Clock Speed: 2400 MHz
    Minimum Voltage: Unknown
    Maximum Voltage: Unknown
    Configured Voltage: Unknown

Handle 0x002D, DMI type 16, 23 bytes
Physical Memory Array
    Location: System Board Or Motherboard
    Use: System Memory
    Error Correction Type: Multi-bit ECC
    Maximum Capacity: 128 GB
    Error Information Handle: Not Provided
    Number Of Devices: 2

Handle 0x002E, DMI type 17, 40 bytes
Memory Device
    Array Handle: 0x002D
    Error Information Handle: Not Provided
    Total Width: 72 bits
    Data Width: 64 bits
    Size: 16384 MB
    Form Factor: DIMM
    Set: None
    Locator: P1-DIMMC1
    Bank Locator: P0_Node0_Channel2_Dimm0
    Type: DDR4
    Type Detail: Synchronous
    Speed: 2400 MHz
    Manufacturer: Micron
    Serial Number: 13711900
    Asset Tag: P1-DIMMC1_AssetTag (date:16/31)
    Part Number: 18ASF2G72PDZ-2G3B1 
    Rank: 2
    Configured Clock Speed: 2400 MHz
    Minimum Voltage: Unknown
    Maximum Voltage: Unknown
    Configured Voltage: Unknown

Handle 0x002F, DMI type 17, 40 bytes
Memory Device
    Array Handle: 0x002D
    Error Information Handle: Not Provided
    Total Width: 72 bits
    Data Width: 64 bits
    Size: 16384 MB
    Form Factor: DIMM
    Set: None
    Locator: P1-DIMMD1
    Bank Locator: P0_Node0_Channel3_Dimm0
    Type: DDR4
    Type Detail: Synchronous
    Speed: 2400 MHz
    Manufacturer: Micron
    Serial Number: 137118FF
    Asset Tag: P1-DIMMD1_AssetTag (date:16/31)
    Part Number: 18ASF2G72PDZ-2G3B1 
    Rank: 2
    Configured Clock Speed: 2400 MHz
    Minimum Voltage: Unknown
    Maximum Voltage: Unknown
    Configured Voltage: Unknown

Handle 0x0030, DMI type 16, 23 bytes
Physical Memory Array
    Location: System Board Or Motherboard
    Use: System Memory
    Error Correction Type: Multi-bit ECC
    Maximum Capacity: 128 GB
    Error Information Handle: Not Provided
    Number Of Devices: 2

Handle 0x0031, DMI type 17, 40 bytes
Memory Device
    Array Handle: 0x0030
    Error Information Handle: Not Provided
    Total Width: 72 bits
    Data Width: 64 bits
    Size: 16384 MB
    Form Factor: DIMM
    Set: None
    Locator: P2-DIMME1
    Bank Locator: P1_Node1_Channel0_Dimm0
    Type: DDR4
    Type Detail: Synchronous
    Speed: 2400 MHz
    Manufacturer: Micron
    Serial Number: 13711907
    Asset Tag: P2-DIMME1_AssetTag (date:16/31)
    Part Number: 18ASF2G72PDZ-2G3B1 
    Rank: 2
    Configured Clock Speed: 2400 MHz
    Minimum Voltage: Unknown
    Maximum Voltage: Unknown
    Configured Voltage: Unknown

Handle 0x0032, DMI type 17, 40 bytes
Memory Device
    Array Handle: 0x0030
    Error Information Handle: Not Provided
    Total Width: 72 bits
    Data Width: 64 bits
    Size: 16384 MB
    Form Factor: DIMM
    Set: None
    Locator: P2-DIMMF1
    Bank Locator: P1_Node1_Channel1_Dimm0
    Type: DDR4
    Type Detail: Synchronous
    Speed: 2400 MHz
    Manufacturer: Micron
    Serial Number: 137119F2
    Asset Tag: P2-DIMMF1_AssetTag (date:16/31)
    Part Number: 18ASF2G72PDZ-2G3B1 
    Rank: 2
    Configured Clock Speed: 2400 MHz
    Minimum Voltage: Unknown
    Maximum Voltage: Unknown
    Configured Voltage: Unknown

Handle 0x0033, DMI type 16, 23 bytes
Physical Memory Array
    Location: System Board Or Motherboard
    Use: System Memory
    Error Correction Type: Multi-bit ECC
    Maximum Capacity: 128 GB
    Error Information Handle: Not Provided
    Number Of Devices: 2

Handle 0x0034, DMI type 17, 40 bytes
Memory Device
    Array Handle: 0x0033
    Error Information Handle: Not Provided
    Total Width: 72 bits
    Data Width: 64 bits
    Size: 16384 MB
    Form Factor: DIMM
    Set: None
    Locator: P2-DIMMG1
    Bank Locator: P1_Node1_Channel2_Dimm0
    Type: DDR4
    Type Detail: Synchronous
    Speed: 2400 MHz
    Manufacturer: Micron
    Serial Number: 137119F4
    Asset Tag: P2-DIMMG1_AssetTag (date:16/31)
    Part Number: 18ASF2G72PDZ-2G3B1 
    Rank: 2
    Configured Clock Speed: 2400 MHz
    Minimum Voltage: Unknown
    Maximum Voltage: Unknown
    Configured Voltage: Unknown

Handle 0x0035, DMI type 17, 40 bytes
Memory Device
    Array Handle: 0x0033
    Error Information Handle: Not Provided
    Total Width: 72 bits
    Data Width: 64 bits
    Size: 16384 MB
    Form Factor: DIMM
    Set: None
    Locator: P2-DIMMH1
    Bank Locator: P1_Node1_Channel3_Dimm0
    Type: DDR4
    Type Detail: Synchronous
    Speed: 2400 MHz
    Manufacturer: Micron
    Serial Number: 137119F3
    Asset Tag: P2-DIMMH1_AssetTag (date:16/31)
    Part Number: 18ASF2G72PDZ-2G3B1 
    Rank: 2
    Configured Clock Speed: 2400 MHz
    Minimum Voltage: Unknown
    Maximum Voltage: Unknown
    Configured Voltage: Unknown
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 211,376评论 6 491
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 90,126评论 2 385
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 156,966评论 0 347
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 56,432评论 1 283
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 65,519评论 6 385
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 49,792评论 1 290
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 38,933评论 3 406
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 37,701评论 0 266
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 44,143评论 1 303
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 36,488评论 2 327
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 38,626评论 1 340
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 34,292评论 4 329
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 39,896评论 3 313
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 30,742评论 0 21
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 31,977评论 1 265
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 46,324评论 2 360
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 43,494评论 2 348

推荐阅读更多精彩内容