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

时间:2021-05-19

在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: 1Locator: DIMM1 Bank Locator: Not SpecifiedType: Type Detail: Synchronous #输入详细信息:同步 Speed: 667 MHz (1.5 ns) #速度: 667兆赫( 1.5纳秒)Manufacturer: 80AD7FB380AD #制造商Serial Number: 42600700 #序号Asset Tag: 010910Part Number: HYMP112F72CP8D3-Y5--//by Memory DeviceArray Handle: 0x1000Error Information Handle: Not ProvidedTotal Width: 72 bitsData Width: 64 bitsSize: 1024 MBForm Factor: Set: 1Locator: DIMM2 Bank Locator: Not SpecifiedType: Type Detail: SynchronousSpeed: 667 MHz (1.5 ns)Manufacturer: 80AD7FB380ADSerial Number: 42600213Asset Tag: 010910Part Number: HYMP112F72CP8D3-Y5--Memory DeviceArray Handle: 0x1000Error Information Handle: Not ProvidedTotal Width: 72 bitsData Width: 64 bitsSize: 1024 MBForm Factor: Set: 2Locator: DIMM3 Bank Locator: Not SpecifiedType: Type Detail: SynchronousSpeed: 667 MHz (1.5 ns)Manufacturer: 855185518551Serial Number: 0503BE1AAsset Tag: 4C0838Part Number: 72T128401EFA3SC2 --Memory DeviceArray Handle: 0x1000Error Information Handle: Not ProvidedTotal Width: 72 bitsData Width: 64 bitsSize: 1024 MBForm Factor: Set: 2Locator: DIMM4 Bank Locator: Not SpecifiedType: Type Detail: SynchronousSpeed: 667 MHz (1.5 ns)Manufacturer: 855185518551Serial Number: 0503BF1FAsset Tag: 4C0838Part Number: 72T128401EFA3SC2 --Memory DeviceArray Handle: 0x1000Error Information Handle: Not ProvidedTotal Width: 72 bitsData Width: 64 bitsSize: No Module InstalledForm Factor: Set: 3Locator: DIMM5 Bank Locator: Not SpecifiedType: Type Detail: SynchronousSpeed: UnknownManufacturer: Serial Number: Asset Tag: Part Number: --Memory DeviceArray Handle: 0x1000Error Information Handle: Not ProvidedTotal Width: 72 bitsData Width: 64 bitsSize: No Module InstalledForm Factor: Set: 3Locator: DIMM6 Bank Locator: Not SpecifiedType: Type Detail: SynchronousSpeed: UnknownManufacturer: Serial Number: Asset Tag: Part Number: --Memory DeviceArray Handle: 0x1000Error Information Handle: Not ProvidedTotal Width: 72 bitsData Width: 64 bitsSize: No Module InstalledForm Factor: Set: 4Locator: DIMM7 Bank Locator: Not SpecifiedType: Type Detail: SynchronousSpeed: UnknownManufacturer: Serial Number: Asset Tag: Part Number: --//by Memory DeviceArray Handle: 0x1000Error Information Handle: Not ProvidedTotal Width: 72 bitsData Width: 64 bitsSize: No Module InstalledForm Factor: Set: 4Locator: DIMM8 Bank Locator: Not SpecifiedType: Type Detail: SynchronousSpeed: UnknownManufacturer: Serial Number: Asset Tag: Part Number:

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

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

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

声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。

相关文章