1. 程式人生 > >查看linux服務器內存信息

查看linux服務器內存信息

pri grep print ++ ras gin dmi localhost 服務

查看服務器內存信息

dmidecode|grep -P -A5 "Memory\s+Device"|grep Size

[[email protected] home]# dmidecode|grep -P -A5 "Memory\s+Device"|grep Size
Size: 16384 MB
Size: No Module Installed
Size: No Module Installed
Size: 16384 MB
Size: No Module Installed
Size: No Module Installed
Size: No Module Installed

Size: No Module Installed
Size: No Module Installed
Size: No Module Installed
Size: No Module Installed
Size: No Module Installed
Size: No Module Installed
Size: No Module Installed
Size: No Module Installed
Size: No Module Installed
Size: No Module Installed
Size: No Module Installed
Size: No Module Installed
Size: No Module Installed
Size: 16384 MB
Size: No Module Installed
Size: No Module Installed
Size: 16384 MB

查看共有多少個槽位
[[email protected] home]# dmidecode|grep -P -A5 "Memory\s+Device"|grep Size|wc -l
24

查看共插了多少根內存條

[[email protected] ~]# dmidecode|grep -P -A5 "Memory\s+Device"|grep Size|awk -F: ‘BEGIN{count=0}$2~/16384 MB/{count++}END{print "count="count}‘

count=32

查看linux服務器內存信息