Processing math: 100%

linux查看服务器的型号

Catalogue

查询服务器的型号

1
2
3
dmidecode -t 1
或者是
dmidecode |grep "Product Name"

查询主板信息

1
dmidecode -t 2

查看cpu型号

1
cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c

查看cpu物理数

1
cat /proc/cpuinfo |grep "physical id" | sort | uniq | wc -l

查看单个cpu核数

1
cat /proc/cpuinfo| grep "cpu cores"| uniq

查看cpu逻辑数

1
cat /proc/cpuinfo| grep "processor"| wc -l

查看内存型号

1
dmidecode -t 17

查看内存插槽数和当前内存数

1
dmidecode|grep -P -A5 "Memory Device" |grep Size

大部分服务器都配置了阵列卡,对硬盘做了raid,可以通过MegaCli这个工具进行命令查询阵列卡及硬盘信息(安装包见附件)

1
2
3
4
5
6
7
8
9
10
11
MegaCli64 -cfgdsply -aALL

RAID型号对应表信息如下:

RAID Level : Primary-1, Secondary-0, RAID Level Qualifier-0" #代表Raid 1

RAID Level : Primary-0, Secondary-0, RAID Level Qualifier-0" #代表Raid 0

RAID Level : Primary-5, Secondary-0, RAID Level Qualifier-3" #代表Raid 5

RAID Level : Primary-1, Secondary-3, RAID Level Qualifier-0" #代表Raid10