服务器 
首页 > 服务器 > 浏览文章

linux下查看内存条数及每根内存大小的实现方法(推荐)

(编辑:jimmy 日期: 2024/11/16 浏览:3 次 )

在linux系统中,查看内存条个数,及每根内存的大小,可以使用dmidecode命令。

如下:

#dmidecode | grep -A16 "Memory Device$"

输出结果:

Memory Device #存储设备
Array Handle: 0x1000 #阵列处理
Error Information Handle: Not Provided #错误信息的处理:不提供 
Total Width: 72 bits #总宽度: 72位
Data Width: 64 bits #数据宽度: 64位 
Size: 1024 MB #大小
Form Factor: 
Set: 1
Locator: DIMM1 
Bank Locator: Not Specified
Type: 
Type Detail: Synchronous #输入详细信息:同步 
Speed: 667 MHz (1.5 ns) #速度: 667兆赫( 1.5纳秒)
Manufacturer: 80AD7FB380AD #制造商
Serial Number: 42600700 #序号
Asset Tag: 010910
Part Number: HYMP112F72CP8D3-Y5
--
//by www.jb51.net
Memory Device
Array Handle: 0x1000
Error Information Handle: Not Provided
Total Width: 72 bits
Data Width: 64 bits
Size: 1024 MB
Form Factor: 
Set: 1
Locator: DIMM2 
Bank Locator: Not Specified
Type: 
Type Detail: Synchronous
Speed: 667 MHz (1.5 ns)
Manufacturer: 80AD7FB380AD
Serial Number: 42600213
Asset Tag: 010910
Part Number: HYMP112F72CP8D3-Y5
--
Memory Device
Array Handle: 0x1000
Error Information Handle: Not Provided
Total Width: 72 bits
Data Width: 64 bits
Size: 1024 MB
Form Factor: 
Set: 2
Locator: DIMM3 
Bank Locator: Not Specified
Type: 
Type Detail: Synchronous
Speed: 667 MHz (1.5 ns)
Manufacturer: 855185518551
Serial Number: 0503BE1A
Asset Tag: 4C0838
Part Number: 72T128401EFA3SC2 
--
Memory Device
Array Handle: 0x1000
Error Information Handle: Not Provided
Total Width: 72 bits
Data Width: 64 bits
Size: 1024 MB
Form Factor: 
Set: 2
Locator: DIMM4 
Bank Locator: Not Specified
Type: 
Type Detail: Synchronous
Speed: 667 MHz (1.5 ns)
Manufacturer: 855185518551
Serial Number: 0503BF1F
Asset Tag: 4C0838
Part Number: 72T128401EFA3SC2 
--
Memory Device
Array Handle: 0x1000
Error Information Handle: Not Provided
Total Width: 72 bits
Data Width: 64 bits
Size: No Module Installed
Form Factor: 
Set: 3
Locator: DIMM5 
Bank Locator: Not Specified
Type: 
Type Detail: Synchronous
Speed: Unknown
Manufacturer: 
Serial Number: 
Asset Tag: 
Part Number: 
--
Memory Device
Array Handle: 0x1000
Error Information Handle: Not Provided
Total Width: 72 bits
Data Width: 64 bits
Size: No Module Installed
Form Factor: 
Set: 3
Locator: DIMM6 
Bank Locator: Not Specified
Type: 
Type Detail: Synchronous
Speed: Unknown
Manufacturer: 
Serial Number: 
Asset Tag: 
Part Number: 
--
Memory Device
Array Handle: 0x1000
Error Information Handle: Not Provided
Total Width: 72 bits
Data Width: 64 bits
Size: No Module Installed
Form Factor: 
Set: 4
Locator: DIMM7 
Bank Locator: Not Specified
Type: 
Type Detail: Synchronous
Speed: Unknown
Manufacturer: 
Serial Number: 
Asset Tag: 
Part Number: 
--//by www.jb51.net
Memory Device
Array Handle: 0x1000
Error Information Handle: Not Provided
Total Width: 72 bits
Data Width: 64 bits
Size: No Module Installed
Form Factor: 
Set: 4
Locator: DIMM8 
Bank Locator: Not Specified
Type: 
Type Detail: Synchronous
Speed: Unknown
Manufacturer: 
Serial Number: 
Asset Tag: 
Part Number:

然后,用free命令查看当前内存的使用情况:

# free -m 
total used free shared buffers cached
Mem: 4054 2963 1090 0 144 1272
-/+ buffers/cache: 1547 2506
Swap: 4094 0 4094

以上就是小编为大家带来的linux下查看内存条数及每根内存大小的实现方法(推荐)全部内容了,希望大家多多支持~

上一篇:使用ssh-keygen,实现免密码登陆linux的方法
下一篇:docker 的java编译环境构建详细介绍
一句话新闻
微软与英特尔等合作伙伴联合定义“AI PC”:键盘需配有Copilot物理按键
几个月来,英特尔、微软、AMD和其它厂商都在共同推动“AI PC”的想法,朝着更多的AI功能迈进。在近日,英特尔在台北举行的开发者活动中,也宣布了关于AI PC加速计划、新的PC开发者计划和独立硬件供应商计划。
在此次发布会上,英特尔还发布了全新的全新的酷睿Ultra Meteor Lake NUC开发套件,以及联合微软等合作伙伴联合定义“AI PC”的定义标准。