linux查看硬件信息

01-25

用来查看机器的型号dmidecode |grep Name查看机器各种硬件信息,比如说cpu,内存,网卡等等

lshw -short|egrep 'CPU|4GiB DIMM|eth'

lshw -short|grep '4GiB DIMM'|wc -l查看磁盘是否是ssd

/opt/MegaRAID/MegaCli/MegaCli64 -PDList -aAll|egrep 'Raw Size|SSD'

查看内存的状态,内存的总量free -g