查看linux服务器内存信息

查看服务器内存信息

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

[root@localhost 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

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

查看共插了多少根内存条

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

上一篇:JVM菜鸟进阶高手之路八(一些细节)


下一篇:TYVJ P1023 奶牛的锻炼 Label:dp