注:查看内容可结合监控工具zabbix进行监控。如同一类型有多个结果,可结合自动发现规则,检测OK可通过system.run或str日志监控进行监控
一、查看服务器硬件信息
(1)查看服务器型号、序列号
[root@Master ~]# dmidecode|grep "System Information" -A9|egrep "Manufacturer|Product|Serial"
(2)查看主板型号
[root@Master ~]# dmidecode |grep -A16 "System Information$"
(3)查看BIOS信息
[root@Master ~]# dmidecode -t bios
# dmidecode 2.12
SMBIOS 2.8 present.
Handle 0x0008, DMI type 0, 24 bytes
BIOS Information
Vendor: HP
Version: U19
Release Date: 12/27/2015
Address: 0xF0000
Runtime Size: 64 kB
ROM Size: 16384 kB
Characteristics:
PCI is supported
PNP is supported
BIOS is upgradeable
BIOS shadowing is allowed
ESCD support is available
Boot from CD is supported
Selectable boot is supported
EDD is supported
5.25"/360 kB floppy services are supported (int 13h)
5.25"/1.2 MB floppy services are supported (int 13h)
3.5"/720 kB floppy services are supported (int 13h)
Print screen service is supported (int 5h)
8042 keyboard services are supported (int 9h)
Serial services are supported (int 14h)
Printer services are supported (int 17h)
CGA/mono video services are supported (int 10h)
ACPI is supported
USB legacy is supported
BIOS boot specification is supported
Function key-initiated network boot is supported
Targeted content distribution is supported
UEFI is supported
BIOS Revision: 2.0
Firmware Revision: 2.40
(3)查看内存槽及内存条
[root@Master ~]# dmidecode -t memory | head -45 | tail -23
Memory Device
Array Handle: 0x000A
Error Information Handle: Not Provided
Total Width: 72 bits
Data Width: 64 bits
Size: 16384 MB
Form Factor: DIMM
Set: None
Locator: PROC 1 DIMM 1
Bank Locator: Not Specified
Type: DDR4
Type Detail: Synchronous Registered (Buffered)
Speed: 2133 MHz
Manufacturer: HP
Serial Number: Not Specified
Asset Tag: Not Specified
Part Number: 752369-081
Rank: 2
Configured Clock Speed: 2133 MHz
Minimum Voltage: 1.2 V
Maximum Voltage: 1.2 V
Configured Voltage: 1.2 V
[root@Master ~]#
(4)查看网卡信
[root@Master ~]# dmesg | grep -i Ethernet
igb: Intel(R) Gigabit Ethernet Network Driver - version 5.3.0-k
igb 0000:04:00.0: Intel(R) Gigabit Ethernet Network Connection
igb 0000:04:00.1: Intel(R) Gigabit Ethernet Network Connection
igb 0000:04:00.2: Intel(R) Gigabit Ethernet Network Connection
igb 0000:04:00.3: Intel(R) Gigabit Ethernet Network Connection
igb 0000:02:00.0: Intel(R) Gigabit Ethernet Network Connection
igb 0000:02:00.1: Intel(R) Gigabit Ethernet Network Connection
(5) 查看pci信息,即主板所有硬件槽信息
[root@Master ~]# lspci | head -10
00:00.0 Host bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 DMI2 (rev 02)
00:01.0 PCI b