linux下查看内存条数及每根内存大小的实现方法(推荐)
在linux系统中,查看内存条个数,及每根内存的大小,可以使用dmidecode命令。
如下:
#dmidecode|grep-A16"MemoryDevice$"
输出结果:
MemoryDevice#存储设备 ArrayHandle:0x1000#阵列处理 ErrorInformationHandle:NotProvided#错误信息的处理:不提供 TotalWidth:72bits#总宽度:72位 DataWidth:64bits#数据宽度:64位 Size:1024MB#大小 FormFactor: Set:1 Locator:DIMM1 BankLocator:NotSpecified Type: TypeDetail:Synchronous#输入详细信息:同步 Speed:667MHz(1.5ns)#速度:667兆赫(1.5纳秒) Manufacturer:80AD7FB380AD#制造商 SerialNumber:42600700#序号 AssetTag:010910 PartNumber:HYMP112F72CP8D3-Y5 -- //bywww.nhooo.com MemoryDevice ArrayHandle:0x1000 ErrorInformationHandle:NotProvided TotalWidth:72bits DataWidth:64bits Size:1024MB FormFactor: Set:1 Locator:DIMM2 BankLocator:NotSpecified Type: TypeDetail:Synchronous Speed:667MHz(1.5ns) Manufacturer:80AD7FB380AD SerialNumber:42600213 AssetTag:010910 PartNumber:HYMP112F72CP8D3-Y5 -- MemoryDevice ArrayHandle:0x1000 ErrorInformationHandle:NotProvided TotalWidth:72bits DataWidth:64bits Size:1024MB FormFactor: Set:2 Locator:DIMM3 BankLocator:NotSpecified Type: TypeDetail:Synchronous Speed:667MHz(1.5ns) Manufacturer:855185518551 SerialNumber:0503BE1A AssetTag:4C0838 PartNumber:72T128401EFA3SC2 -- MemoryDevice ArrayHandle:0x1000 ErrorInformationHandle:NotProvided TotalWidth:72bits DataWidth:64bits Size:1024MB FormFactor: Set:2 Locator:DIMM4 BankLocator:NotSpecified Type: TypeDetail:Synchronous Speed:667MHz(1.5ns) Manufacturer:855185518551 SerialNumber:0503BF1F AssetTag:4C0838 PartNumber:72T128401EFA3SC2 -- MemoryDevice ArrayHandle:0x1000 ErrorInformationHandle:NotProvided TotalWidth:72bits DataWidth:64bits Size:NoModuleInstalled FormFactor: Set:3 Locator:DIMM5 BankLocator:NotSpecified Type: TypeDetail:Synchronous Speed:Unknown Manufacturer: SerialNumber: AssetTag: PartNumber: -- MemoryDevice ArrayHandle:0x1000 ErrorInformationHandle:NotProvided TotalWidth:72bits DataWidth:64bits Size:NoModuleInstalled FormFactor: Set:3 Locator:DIMM6 BankLocator:NotSpecified Type: TypeDetail:Synchronous Speed:Unknown Manufacturer: SerialNumber: AssetTag: PartNumber: -- MemoryDevice ArrayHandle:0x1000 ErrorInformationHandle:NotProvided TotalWidth:72bits DataWidth:64bits Size:NoModuleInstalled FormFactor: Set:4 Locator:DIMM7 BankLocator:NotSpecified Type: TypeDetail:Synchronous Speed:Unknown Manufacturer: SerialNumber: AssetTag: PartNumber: --//bywww.nhooo.com MemoryDevice ArrayHandle:0x1000 ErrorInformationHandle:NotProvided TotalWidth:72bits DataWidth:64bits Size:NoModuleInstalled FormFactor: Set:4 Locator:DIMM8 BankLocator:NotSpecified Type: TypeDetail:Synchronous Speed:Unknown Manufacturer: SerialNumber: AssetTag: PartNumber:
然后,用free命令查看当前内存的使用情况:
#free-m totalusedfreesharedbufferscached Mem:40542963109001441272 -/+buffers/cache:15472506 Swap:409404094
以上就是小编为大家带来的linux下查看内存条数及每根内存大小的实现方法(推荐)全部内容了,希望大家多多支持毛票票~