硬件系统重点关注的指标:

# 总核数 = 物理CPU个数 X 每颗物理CPU的核数 
# 总逻辑CPU数 = 物理CPU个数 X 每颗物理CPU的核数 X 超线程数

# 查看物理CPU个数
cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l
或grep 'physical id' /proc/cpuinfo | sort -u | wc -l

# 查看每个物理CPU中core的个数(即核数)
cat /proc/cpuinfo| grep "cpu cores"| uniq
或者grep 'core id' /proc/cpuinfo | sort -u | wc -l

# 查看逻辑CPU的个数
cat /proc/cpuinfo| grep "processor"| wc -l
或者grep 'processor' /proc/cpuinfo | sort -u | wc -l
# 查看CPU信息(型号)
cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
或者dmidecode -s processor-version
#查看内 存信息
cat /proc/meminfo

 

1.查看硬件服务器型号:

# dmidecode|grep "System Information" -A9|egrep  "Manufacturer|Product"
Manufacturer: HP
Product Name: ProLiant DL380 Gen9

2.查看操作系统信息:

2.1 发行版本信息

# cat /etc/redhat-release 
CentOS Linux release 7.2.1511 (Core) 
# cat /etc/issue
CentOS release 7.1
Kernel \r on an \m

#yum install -y redhat-lsb
#lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: CentOS
Description:    CentOS Linux release 7.4.1708 (Core) 
Release:        7.4.1708
Codename:       Core

2.2查看操作系统是否是64bit:
# getconf LONG_BIT
64

2.3  查看内核版本信息:

# uname -a
Linux node1 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22:10:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

2.4 查看系统已经加载的模块:

# lsmod
Module                  Size  Used by
dccp_diag              12596  0 
dccp                   93080  1 dccp_diag
tcp_diag               12591  0 
udp_diag               12801  0 
inet_diag              18543  3 tcp_diag,dccp_diag,udp_diag
unix_diag              12601  0 
rbd                    73158  0 
ip6table_nat           12864  0 
nf_conntrack_ipv6      18738  1 
nf_defrag_ipv6         34768  1 nf_conntrack_ipv6
nf_nat_ipv6            14131  1 ip6table_nat
ip6_tables             27025  1 ip6table_nat
ipt_REJECT             12541  0 
veth                   13365  0 
xt_ipvs                12616  1 
xt_set                 13181  2 
xt_multiport           12798  35 
iptable_mangle         12695  1 
iptable_raw            12678  1 
ip_set_hash_net        31664  2 
nf_conntrack_netlink    36150  0 
xt_statistic           12601  2 
xt_nat                 12681  15 
xt_recent              18542  2 
ip_set                 36439  2 ip_set_hash_net,xt_set
nfnetlink              14606  2 ip_set,nf_conntrack_netlink
ip_vs                 140944  1 xt_ipvs
xt_comment             12504  219 
xt_mark                12563  38 
ipt_MASQUERADE         12678  3 
nf_nat_masquerade_ipv4    13412  1 ipt_MASQUERADE
iptable_nat            12875  1 
nf_conntrack_ipv4      14862  13 
nf_defrag_ipv4         12729  1 nf_conntrack_ipv4
nf_nat_ipv4            14115  1 iptable_nat
xt_addrtype            12635  3 
iptable_filter         12810  1 
xt_conntrack           12760  12 
nf_nat                 26146  4 nf_nat_ipv4,nf_nat_ipv6,xt_nat,nf_nat_masquerade_ipv4
nf_conntrack          105745  9 ip_vs,nf_nat,nf_nat_ipv4,nf_nat_ipv6,xt_conntrack,nf_nat_masquerade_ipv4,nf_conntrack_netlink,nf_conntrack_ipv4,nf_conntrack_ipv6
bridge                119562  0 
stp                    12976  1 bridge
llc                    14552  2 stp,bridge
overlay                42451  11 
ceph                  305045  0 
libceph               244999  2 rbd,ceph
dns_resolver           13140  1 libceph
iTCO_wdt               13480  0 
iTCO_vendor_support    13718  1 iTCO_wdt
intel_powerclamp       18648  0 
coretemp               13435  0 
intel_rapl             18773  0 
kvm_intel             162153  0 
kvm                   525259  1 kvm_intel
crc32_pclmul           13113  0 
ghash_clmulni_intel    13259  0 
aesni_intel            69884  0 
lrw                    13286  1 aesni_intel
gf128mul               14951  1 lrw
glue_helper            13990  1 aesni_intel
ablk_helper            13597  1 aesni_intel
cryptd                 20359  3 ghash_clmulni_intel,aesni_intel,ablk_helper
ipmi_ssif              23695  0 
pcspkr                 12718  0 
sb_edac                27005  0 
edac_core              57922  1 sb_edac
lpc_ich                21073  0 
i2c_i801               18134  0 
mfd_core               13435  1 lpc_ich
sg                     40721  0 
hpilo                  17381  0 
hpwdt                  14242  0 
shpchp                 37032  0 
wmi                    19070  0 
ipmi_si                53524  0 
ipmi_msghandler        46609  2 ipmi_ssif,ipmi_si
pcc_cpufreq            14082  0 
acpi_power_meter       18087  0 
ip_tables              27240  4 iptable_filter,iptable_mangle,iptable_nat,iptable_raw
xfs                   939662  2 
libcrc32c              12644  3 xfs,ip_vs,libceph
sd_mod                 45497  3 
crc_t10dif             12714  1 sd_mod
crct10dif_generic      12647  0 
crct10dif_pclmul       14289  1 
crct10dif_common       12595  3 crct10dif_pclmul,crct10dif_generic,crc_t10dif
crc32c_intel           22079  1 
mgag200                41467  1 
serio_raw              13462  0 
syscopyarea            12529  1 mgag200
sysfillrect            12701  1 mgag200
sysimgblt              12640  1 mgag200
drm_kms_helper        125008  1 mgag200
ttm                    93441  1 mgag200
ixgbe                 263239  0 
igb                   192596  0 
drm                   349210  4 ttm,drm_kms_helper,mgag200
tg3                   170699  0 
mdio                   13807  1 ixgbe
dca                    15130  2 igb,ixgbe
i2c_algo_bit           13413  2 igb,mgag200
ptp                    19231  3 igb,tg3,ixgbe
i2c_core               40582  7 drm,igb,i2c_i801,ipmi_ssif,drm_kms_helper,mgag200,i2c_algo_bit
hpsa                   90197  2 
pps_core               19106  1 ptp

3.查看服务器CPU统计信息:

# lscpu 
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                48
On-line CPU(s) list:   0-47
Thread(s) per core:    2
Core(s) per socket:    12
Socket(s):             2
NUMA node(s):          2
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 79
Model name:            Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz
Stepping:              1
CPU MHz:               1200.000
BogoMIPS:              4433.40
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              30720K
NUMA node0 CPU(s):     0-11,24-35
NUMA node1 CPU(s):     12-23,36-47

# cat /proc/cpuinfo 
....
processor: 47
vendor_id: GenuineIntel
cpu family: 6
model: 79
model name: Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz
stepping: 1
microcode: 0xb00002a
cpu MHz: 1200.000
cache size: 30720 KB
physical id: 1
siblings: 24
core id: 13
cpu cores: 12
apicid: 59
initial apicid: 59
fpu: yes
fpu_exception: yes
cpuid level: 20
wp: yes
flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch ida arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm rdseed adx smap xsaveopt cqm_llc cqm_occup_llc
bogomips: 4433.40
clflush size: 64
cache_alignment: 64
address sizes: 46 bits physical, 48 bits virtual
power management:

4.查看CPU型号、插槽数(物理CPU个数)、内核数(cores)、逻辑CPU个数:

# cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
     48  Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz
# cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l
2
# cat /proc/cpuinfo| grep "cpu cores"| uniq
cpu cores: 12
# cat /proc/cpuinfo| grep "processor"| wc -l
48
理论上不使用超线程技术的前提下有如下结论:
  物理CPU个数*核数=逻辑CPU个数
配置服务器的应用时,以逻辑CPU个数为准。

5.内存信息查看:
查看服务器内存使用的情况:

# free -h
              total        used        free      shared  buff/cache   available
Mem:           188G         20G         40G         21M        127G        167G
Swap:            0B          0B          0B

total: 内存总量
used: 已使用
free: 未使用
shared: 多进程共享的内存总量
-buffers/cache: 已使用内存
+buffers/cache: 可用内存
可用内存=free+buffers+cached

内存硬件信息:
# dmidecode -t memory
...
Handle 0x0023, DMI type 17, 40 bytes
Memory Device
Array Handle: 0x000B
Error Information Handle: Not Provided
Total Width: 72 bits
Data Width: 64 bits
Size: 32 GB
Form Factor: DIMM
Set: 23
Locator: PROC 2 DIMM 12
Bank Locator: Not Specified
Type: DDR4
Type Detail: Synchronous Registered (Buffered)
Speed: 2400 MHz
Manufacturer: HP     
Serial Number: Not Specified
Asset Tag: Not Specified
Part Number: 809083-091
Rank: 2
Configured Clock Speed: 2400 MHz
Minimum Voltage:  1.2 V
Maximum Voltage:  1.2 V
Configured Voltage:  1.2 V

查看内存详细使用情况:
# cat /proc/meminfo
MemTotal:       197965372 kB
MemFree:        42671988 kB
MemAvailable:   175652544 kB
Buffers:             876 kB
Cached:         129411972 kB
SwapCached:            0 kB
Active:         56358672 kB
Inactive:       93131072 kB
Active(anon):   20078472 kB
Inactive(anon):    20284 kB
Active(file):   36280200 kB
Inactive(file): 93110788 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                28 kB
Writeback:             0 kB
AnonPages:      20079652 kB
Mapped:           322976 kB
Shmem:             21852 kB
Slab:            4258000 kB
SReclaimable:    3927428 kB
SUnreclaim:       330572 kB
KernelStack:       25648 kB
PageTables:        48100 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    98982684 kB
Committed_AS:   23618788 kB
VmallocTotal:   34359738367 kB
VmallocUsed:      702024 kB
VmallocChunk:   34258194444 kB
HardwareCorrupted:     0 kB
AnonHugePages:  19802112 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:      248576 kB
DirectMap2M:    19546112 kB
DirectMap1G:    183500800 kB

查看内存的插槽数,已经使用多少插槽.每条内存多大:
# dmidecode|grep -A5 "Memory Device"|grep Size|grep -v Range
Size: 32 GB
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: 32 GB
Size: No Module Installed
Size: No Module Installed
Size: 32 GB
Size: 32 GB
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: 32 GB
Size: No Module Installed
Size: No Module Installed
Size: 32 GB

6.硬盘:
查看硬盘和分区分布

# lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 931.5G  0 disk 
└─sda1   8:1    0 931.5G  0 part /
sdb      8:16   0   2.2T  0 disk /data

查看硬盘和分区的详细信息:

# fdisk -l

Disk /dev/sda: 1000.2 GB, 1000171331584 bytes, 1953459632 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 262144 bytes / 262144 bytes
Disk label type: dos
Disk identifier: 0x0008f54a

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048  1953458175   976728064   83  Linux

Disk /dev/sdb: 2400.3 GB, 2400348626944 bytes, 4688180912 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 262144 bytes / 1310720 bytes

查看文件系统的磁盘空间占用情况:

# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       932G  178G  754G  20% /
devtmpfs         95G     0   95G   0% /dev
tmpfs            95G     0   95G   0% /dev/shm
tmpfs            95G   18M   95G   1% /run
tmpfs            95G     0   95G   0% /sys/fs/cgroup
/dev/sdb        2.2T   24G  2.2T   2% /data
tmpfs            19G     0   19G   0% /run/user/0

7.查看物理网卡的信息:

# lspci | grep -i 'eth'
02:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01)
02:00.1 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01)
02:00.2 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01)
02:00.3 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01)
04:00.0 Ethernet controller: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection (rev 01)
04:00.1 Ethernet controller: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection (rev 01)
08:00.0 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
08:00.1 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)

8.NVIDIA显卡查看:

# nvidia-smi    
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 375.26                 Driver Version: 375.26                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  Tesla K80           Off  | 0000:04:00.0     Off |                    0 |
| N/A   60C    P0    75W / 149W |   4344MiB / 11439MiB |      2%      Default |
+-------------------------------+----------------------+----------------------+
|   1  Tesla K80           Off  | 0000:05:00.0     Off |                    0 |
| N/A   43C    P0    89W / 149W |   2196MiB / 11439MiB |     15%      Default |
+-------------------------------+----------------------+----------------------+
|   2  Tesla K80           Off  | 0000:08:00.0     Off |                    0 |
| N/A   90C    P0   100W / 149W |   2196MiB / 11439MiB |     98%      Default |
+-------------------------------+----------------------+----------------------+
|   3  Tesla K80           Off  | 0000:09:00.0     Off |                    0 |
| N/A   60C    P0    87W / 149W |   4212MiB / 11439MiB |     26%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID  Type  Process name                               Usage      |
|=============================================================================|
|    0     25459    C   python3                                       4336MiB |
|    1     25459    C   python3                                       2188MiB |
|    2     25459    C   python3                                       2188MiB |
|    3     25459    C   python3                                       4204MiB |
+-----------------------------------------------------------------------------+
WARNING: infoROM is corrupted at gpu 0000:04:00.0

9.其他PCI插卡设备的信息:

# lspci
00:00.0 Host bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D DMI2 (rev 01)
00:01.0 PCI bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D PCI Express Root Port 1 (rev 01)
00:01.1 PCI bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D PCI Express Root Port 1 (rev 01)
00:02.0 PCI bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D PCI Express Root Port 2 (rev 01)
00:02.1 PCI bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D PCI Express Root Port 2 (rev 01)
00:02.2 PCI bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D PCI Express Root Port 2 (rev 01)
00:02.3 PCI bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D PCI Express Root Port 2 (rev 01)
00:03.0 PCI bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D PCI Express Root Port 3 (rev 01)
00:03.1 PCI bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D PCI Express Root Port 3 (rev 01)
00:03.2 PCI bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D PCI Express Root Port 3 (rev 01)
00:03.3 PCI bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D PCI Express Root Port 3 (rev 01)
00:04.0 System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D Crystal Beach DMA Channel 0 (rev 01)
00:04.1 System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D Crystal Beach DMA Channel 1 (rev 01)
00:04.2 System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D Crystal Beach DMA Channel 2 (rev 01)
00:04.3 System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D Crystal Beach DMA Channel 3 (rev 01)
00:04.4 System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D Crystal Beach DMA Channel 4 (rev 01)
00:04.5 System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D Crystal Beach DMA Channel 5 (rev 01)
00:04.6 System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D Crystal Beach DMA Channel 6 (rev 01)
00:04.7 System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D Crystal Beach DMA Channel 7 (rev 01)
00:05.0 System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D Map/VTd_Misc/System Management (rev 01)
00:05.1 System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D IIO Hot Plug (rev 01)
00:05.2 System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D IIO RAS/Control Status/Global Errors (rev 01)
00:05.4 PIC: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D I/O APIC (rev 01)
00:11.0 Unassigned class [ff00]: Intel Corporation C610/X99 series chipset SPSR (rev 05)
00:1a.0 USB controller: Intel Corporation C610/X99 series chipset USB Enhanced Host Controller #2 (rev 05)
00:1c.0 PCI bridge: Intel Corporation C610/X99 series chipset PCI Express Root Port #1 (rev d5)
00:1c.2 PCI bridge: Intel Corporation C610/X99 series chipset PCI Express Root Port #3 (rev d5)
00:1c.4 PCI bridge: Intel Corporation C610/X99 series chipset PCI Express Root Port #5 (rev d5)
00:1c.6 PCI bridge: Intel Corporation C610/X99 series chipset PCI Express Root Port #7 (rev d5)
00:1c.7 PCI bridge: Intel Corporation C610/X99 series chipset PCI Express Root Port #8 (rev d5)
00:1d.0 USB controller: Intel Corporation C610/X99 series chipset USB Enhanced Host Controller #1 (rev 05)
00:1f.0 ISA bridge: Intel Corporation C610/X99 series chipset LPC Controller (rev 05)
00:1f.3 SMBus: Intel Corporation C610/X99 series chipset SMBus Controller (rev 05)
01:00.0 System peripheral: Hewlett-Packard Company Integrated Lights-Out Standard Slave Instrumentation & System Support (rev 06)
01:00.1 VGA compatible controller: Matrox Electronics Systems Ltd. MGA G200EH (rev 01)
01:00.2 System peripheral: Hewlett-Packard Company Integrated Lights-Out Standard Management Processor Support and Messaging (rev 06)
01:00.4 USB controller: Hewlett-Packard Company Integrated Lights-Out Standard Virtual USB Controller (rev 03)
02:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01)
02:00.1 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01)
02:00.2 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01)
02:00.3 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01)
03:00.0 RAID bus controller: Hewlett-Packard Company Smart Array Gen9 Controllers (rev 01)
04:00.0 Ethernet controller: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection (rev 01)
04:00.1 Ethernet controller: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection (rev 01)
08:00.0 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
-----
ff:16.7 System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D DDRIO Global Broadcast (rev 01)
ff:17.0 System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D Memory Controller 1 - Channel 0 Thermal Control (rev 01)
ff:17.1 System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D Memory Controller 1 - Channel 1 Thermal Control (rev 01)
ff:17.2 System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D Memory Controller 1 - Channel 0 Error (rev 01)
ff:17.3 System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D Memory Controller 1 - Channel 1 Error (rev 01)
ff:17.4 System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D DDRIO Channel 2/3 Interface (rev 01)
ff:17.5 System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D DDRIO Channel 2/3 Interface (rev 01)
ff:17.6 System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D DDRIO Channel 2/3 Interface (rev 01)
ff:17.7 System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D DDRIO Channel 2/3 Interface (rev 01)
ff:1e.0 System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D Power Control Unit (rev 01)
ff:1e.1 System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D Power Control Unit (rev 01)
ff:1e.2 System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D Power Control Unit (rev 01)
ff:1e.3 System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D Power Control Unit (rev 01)
ff:1e.4 System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D Power Control Unit (rev 01)
ff:1f.0 System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D Power Control Unit (rev 01)
ff:1f.2 System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D Power Control Unit (rev 01)

10.查看是否是SSD硬盘:

# cat /sys/block/sda/queue/rotational 
1
因为SSD是非转动盘,如果返回结果为0说明是SSD硬盘,如果返回结果为1,说明是转动盘HDD类的硬盘。 
# lsblk -d -o name,rota
NAME ROTA
fd0     1
sda     1
sr0     1

11.使用工具查看是否是SSD:

yum -y install hdparm
yum -y install install smartmontools

--查看磁盘的详细信息:
sudo hdparm -I /dev/sdb
sudo smartctl -a /dev/sda

--查看是否是SSD磁盘:
# sudo hdparm -I /dev/sdb

/dev/sdb:
SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

ATA device, with non-removable media
Standards:
Likely used: 1
Configuration:
Logicalmaxcurrent
cylinders00
heads00
sectors/track00
--
Logical/Physical Sector size:           512 bytes
device size with M = 1024*1024:           0 MBytes
device size with M = 1000*1000:           0 MBytes 
cache/buffer size  = unknown
Capabilities:
IORDY not likely
Cannot perform double-word IO
R/W multiple sector transfer: not supported
DMA: not supported
PIO: pio0 



# sudo smartctl -x /dev/sdb
smartctl 6.5 2016-05-07 r4318 [x86_64-linux-3.10.0-327.el7.x86_64] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor:               HP
Product:              LOGICAL VOLUME
Revision:             4.52
User Capacity:        2,400,348,626,944 bytes [2.40 TB]
Logical block size:   512 bytes
Physical block size:  4096 bytes
Rotation Rate:        Solid State Device
Logical Unit id:      0x600508b1001c14bfd2545ce4ee7b9d15
Serial number:        PVYKH0BRH96097
Device type:          disk
Local Time is:        Fri Sep 28 16:09:53 2018 CST
SMART support is:     Available - device has SMART capability.
SMART support is:     Enabled
Temperature Warning:  Disabled or Not Supported
Read Cache is:        Enabled
Writeback Cache is:   Disabled

=== START OF READ SMART DATA SECTION ===
SMART Health Status: OK
Current Drive Temperature:     0 C
Drive Trip Temperature:        0 C

Error Counter logging not supported

Device does not support Self Test logging
Device does not support Background scan results logging

注释:可以看到Rotation Rate:        Solid State Device。


smart工具集的信息比hdparm的要更细致,你也可以使用图形界面下的smartctl,
首先安装图形界面安装包yum -y install gsmartcontrol

12. 查看键盘和鼠标

cat /proc/bus/input/devices

13.查看磁盘信息:

# fdisk -l & df -h
Disk /dev/sda: 1000.2 GB, 1000171331584 bytes, 1953459632 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 262144 bytes / 262144 bytes
Disk label type: dos
Disk identifier: 0x0001c960

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048  1953458175   976728064   83  Linux

Disk /dev/sdb: 2400.3 GB, 2400348626944 bytes, 4688180912 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 262144 bytes / 1310720 bytes
Disk label type: dos
Disk identifier: 0xcf27427c

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2560  4294967294  2147482367+  83  Linux

[1] 462208
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       932G   14G  918G   2% /
devtmpfs         95G     0   95G   0% /dev
tmpfs            95G     0   95G   0% /dev/shm
tmpfs            95G  338M   95G   1% /run
tmpfs            95G     0   95G   0% /sys/fs/cgroup
/dev/sdb1       2.0T  646G  1.3T  34% /data
tmpfs            19G     0   19G   0% /run/user/1001
tmpfs            19G  4.0K   19G   1% /run/user/0
tmpfs            19G     0   19G   0% /run/user/1000

14.查看USB设备:

cat /proc/bus/usb/devices

15.查询所有硬件信息:

yum -y install lshw
yum -y install lshw-gui
适用于所有的linux,包括Redhat、SuSE、Debian等发行版。

16.查询系统版本:

#yum -y install redhat-lsb
lsb_release -a ,即可列出所有版本信息
# lsb_release -a
LSB Version::core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID:CentOS
Description:CentOS Linux release 7.2.1511 (Core) 
Release:7.2.1511
Codename:Core