Linux查看硬件信息的简单方法,dmidecode命令、lshw、free命令的用法
用来查看机器的型号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命令: |