|
|
CentOS 8和7版本对比' Q6 E9 _2 p# q d: C
l5 N$ G; x6 L: l J0 Y1 o8 u
功能 CentOS 8 CentOS 7$ @2 B6 J, X2 _( H2 A
内核版本 4.18.0-x 3.10.0-x, s, S" R- I4 g& I: d
文件系统 XFS XFS c( j- r: Q: ^5 E8 e# N- |
时间同步 只支持Chronyd 支持NTP和Chronyd5 i8 l- B# y, q4 `; i+ \- u
文件大小 8EB 500TB0 F! k5 e7 f9 k- V5 g! {- b" i
文件系统大小 1PB 500TB
5 B( m" H: m' n$ v包管理工具 DNF(YUM v4) YUM(YUM v3)
3 ^/ J) g' q+ \6 B3 l- L9 I- Y最大内存 24TB 12TB
+ D. q, g R; z( G/ s4 B P# _防火墙 nftables取代iptables firewalld底层使用iptables6 P8 P- ?$ t0 D% u/ V4 a2 ?
支持架构 支持64-bit ARM 不支持64-bit ARM
4 |+ S2 ?4 N* Q; E* Y7 z- }' X网络管理 默认安装Cockpit 无默认安装
; W) g. Z* } T2 y* J/ e. e& _CPU日志 CPU日志记录在journald进程中 CPU相关日志位于/var/log/cups目录1 S E& b! G7 N6 S1 P2 x/ _
发布时间 2019-09-24 2014-07-07
! w5 e- N" R# O; o" C完整更新 2024-05-01 2020-08-06
9 R; Y4 ~1 v) m1 K支持IPv6 支持 Ready Logo Phase 28 h3 W; D0 `, S" I/ ?- C
Git 2.18 1.7
7 S+ C$ j {' H6 d# `GCC 8.2.1 4.8.5
; Z) P/ `& g( X! E J9 g( b& YPython 3.6.6 2.7.58 G, r% i; j, S
Glibc 2.28 2.17
$ j. L4 E# p2 s8 J OBoost 1.66 1.53. l# l: U# [; E, A. u. `
LLVM/Clang 6.0 5.0' M, a0 y4 l4 a# L! ^
d$ ]3 ?) K, d( Y" D" O
Linux查看硬件信息命令
9 z* x% a C0 i( A一、查看服务器硬件信息
6 c& D' z( }4 H( q: q. Z& Y1 M(1)查看服务器型号、序列号
. H: I. L. q9 n2 D: y& s- f[root@Master ~]# dmidecode|grep "System Information" -A9|egrep "Manufacturer|Product|Serial"
" t4 K C; [$ D' b& z; A- A. M( }6 P- e- P8 U8 O
(2)查看主板型号" k2 m8 b" A/ r1 {
[root@Master ~]# dmidecode |grep -A16 "System Information$" 0 Y6 ]* o' R( |- z
9 M+ M9 R% a$ o+ h# n7 [' z+ N/ I (3)查看BIOS信息& m8 ]/ j# }4 Q( C3 a/ m/ O8 t
复制代码2 G- ~4 N7 `9 Y x3 I2 ?
复制代码! B* b, z y8 l) h) k- t
[root@Master ~]# dmidecode -t bios U7 J- D! H7 S6 ]+ n# V
# dmidecode 2.12
5 P& R3 J. n, ?! H1 M/ }0 ISMBIOS 2.8 present.
0 t& z8 d/ B; q1 J* \- ^# u; THandle 0x0008, DMI type 0, 24 bytes0 g# k5 b* d; Q' K: B+ p
BIOS Information* f- X# l( R) ?! @) i; z4 X
Vendor: HP5 D3 d D, W- z
Version: U19
, O7 p- v( H& F" k! L8 l Release Date: 12/27/20153 c" N3 e' J; }* g
Address: 0xF0000
! ]5 ~: Q) v5 Z, Q) Z! y2 \% T Runtime Size: 64 kB
7 m3 R6 H; u/ A; G6 D ROM Size: 16384 kB
1 Z% y# }/ {8 S$ n+ ^7 c& A4 p( x0 H Characteristics:8 G( |, Q+ D8 }9 c% y8 X/ B
PCI is supported
; d) }, p0 o5 ^4 q PNP is supported
& h. d B/ H, X6 [! J, S: J8 m BIOS is upgradeable
4 c: h8 N3 C& h( c BIOS shadowing is allowed
3 t0 G6 l: z9 q' d w# r& Q ESCD support is available1 V, N- o5 B, w7 V2 [
Boot from CD is supported7 p9 [! ]9 {. x1 p
Selectable boot is supported
0 ]/ F F) y& g! i EDD is supported
9 [. C- ^1 r+ H2 Z 5.25"/360 kB floppy services are supported (int 13h)9 a/ e! j: H1 B& W m
5.25"/1.2 MB floppy services are supported (int 13h)! ?5 [5 _! v; Y# {
3.5"/720 kB floppy services are supported (int 13h)% v& f$ H1 V( p0 T* `6 Z+ Y. d4 r& v0 B
Print screen service is supported (int 5h)# ?9 h$ Y) Q, u& R9 ~8 |
8042 keyboard services are supported (int 9h)
$ W) q: h& K- g ]6 } u Serial services are supported (int 14h)* k6 W, J& I' \6 l- l. P, `% j1 O
Printer services are supported (int 17h)
! A: A: i& J( g; D( w6 R# ?5 @" M7 V CGA/mono video services are supported (int 10h)
3 Z% U- t" p$ _; Y- g ACPI is supported- @7 D! f/ V {8 U+ O
USB legacy is supported9 l& U: ]# x' `
BIOS boot specification is supported
% b2 F3 W* u" i Function key-initiated network boot is supported
: Q a- ^! V& w, z2 Q Targeted content distribution is supported; D9 t5 J* R! Q$ t5 W9 {
UEFI is supported
3 m% ^+ P8 B5 P7 q' {$ B BIOS Revision: 2.0+ l1 O' H( Z9 G9 k4 W
Firmware Revision: 2.40& @# D- w+ T9 N7 h' p7 Y7 [7 H
复制代码3 P7 h% Q, N" g/ {7 t/ K! ?$ P. ]% F$ \
复制代码& T2 P: q" U$ M
(3)查看内存槽及内存条$ u9 l" u- `( Z" c. u1 p/ N
复制代码# g% Q6 t2 Z; l }/ a
复制代码% d3 n$ s1 Z+ m N6 j+ ~' v
[root@Master ~]# dmidecode -t memory | head -45 | tail -23
/ U5 [& z- C; }* {( Q% L% rMemory Device
8 ^' R1 X4 K! |; z7 ? Array Handle: 0x000A
7 b5 z# b: S+ o! `7 }! _! J9 l Error Information Handle: Not Provided1 ]; R6 y& H: H: s5 G3 @
Total Width: 72 bits
& V3 m2 w% k8 S Data Width: 64 bits9 V( z0 z" x* ]5 Q& g1 \
Size: 16384 MB+ f( L/ ~( Q! }
Form Factor: DIMM9 s+ T" l! _$ w+ K: `9 k
Set: None4 D8 V* x1 R2 X( x/ {$ B+ D
Locator: PROC 1 DIMM 1
3 J6 p; R! P2 C0 T: [2 I Bank Locator: Not Specified1 o, w$ K, q; G
Type: DDR4
* R y3 F' I% ] Type Detail: Synchronous Registered (Buffered)
; @5 i0 L0 R) r' L Speed: 2133 MHz
1 ?5 Y. _- }! j V Manufacturer: HP 5 p1 `/ M3 `0 ^
Serial Number: Not Specified8 ?4 {. x* Z# |
Asset Tag: Not Specified$ L. \5 h6 Y. V
Part Number: 752369-081$ I0 h X$ ^5 w/ [
Rank: 2) @5 f" O* X, k+ h& I
Configured Clock Speed: 2133 MHz- ^' V8 [- O0 C: v: M( g$ R
Minimum Voltage: 1.2 V
, b" ~( k/ [# m) \+ h Maximum Voltage: 1.2 V8 a! z& C) r7 x
Configured Voltage: 1.2 V8 D; G7 G3 F$ Q! o
[root@Master ~]#
- Z7 R1 |0 d" R' T' c, P: {复制代码
: M9 [5 I6 ^ ~0 L复制代码
) j/ G0 v: c5 \ a2 s4 C- C& ?4 c% k (4)查看网卡信息
- ^' `# g L9 A; B6 l* L5 J8 _: U' `复制代码5 b2 j& Z3 q& a: m& Y0 P
复制代码
) i6 n5 [$ r0 b1 b8 V3 \, C& N[root@Master ~]# dmesg | grep -i Ethernet
- B; D6 v9 `1 N$ Sigb: Intel(R) Gigabit Ethernet Network Driver - version 5.3.0-k
* ?# I* B; F* ~+ S" \4 e( D: |5 h9 ]igb 0000:04:00.0: Intel(R) Gigabit Ethernet Network Connection
( X% b! {3 B: }3 i" h3 E- [igb 0000:04:00.1: Intel(R) Gigabit Ethernet Network Connection! P1 P0 |0 ]: h2 J; H' ~2 a( G' F! Q
igb 0000:04:00.2: Intel(R) Gigabit Ethernet Network Connection
& `7 A) E- M% X+ K! wigb 0000:04:00.3: Intel(R) Gigabit Ethernet Network Connection+ c) J0 _9 h& w6 i# s% x
igb 0000:02:00.0: Intel(R) Gigabit Ethernet Network Connection+ h3 W/ G6 Z1 x' t' ?
igb 0000:02:00.1: Intel(R) Gigabit Ethernet Network Connection
4 [. S3 P# H$ T2 A: K- h. U: c* b# C% [复制代码
3 t3 B A- i/ [: F/ q( j, x复制代码
- k6 J i8 d7 k* [; l( I# c(5) 查看pci信息,即主板所有硬件槽信息0 d. c8 G6 W8 i+ u+ P1 i
复制代码
% u. N# M/ U9 W# T9 B0 \复制代码
4 N g. D4 e5 Y4 J5 t' h; y[root@Master ~]# lspci | head -10
; g7 y* f& R8 D# O+ W00:00.0 Host bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 DMI2 (rev 02)! r) p* G- Z" a0 u+ y4 W3 Z$ d
00:01.0 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 1 (rev 02)
9 `0 M3 q' d; ^! u5 P+ x4 d' m00:01.1 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 1 (rev 02)
; t/ K# S( A/ D- t00:02.0 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 2 (rev 02)) k5 D4 X* y. P: o! t1 {
00:02.1 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 2 (rev 02)
/ k) G5 _5 C4 a; E8 L) [00:02.2 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 2 (rev 02)2 K2 {4 d; ]3 w3 }+ B
00:02.3 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 2 (rev 02)* X t" q. R& [: W
00:03.0 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 3 (rev 02)
! U* x# G8 E/ _- S: A00:03.1 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 3 (rev 02)% Q3 \4 x- l1 `1 \0 J( h/ r& e
00:03.2 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 3 (rev 02)
# ~1 o: Z0 ?. w9 {1 ~4 G复制代码
: W% L5 @1 _, m- q, B0 j2 L7 w8 |复制代码
5 I' V9 D0 w; S0 l
- O o9 H- s, o$ x! X% u2 |* s& _# ?二、查看CPU信息' B/ s: u5 d' d; o
(1)查看cpu型号
$ Y% J1 ?' V* }! o[root@Master ~]# cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
/ T! r" |. C" p, d$ E 40 Intel(R) Xeon(R) CPU E5-2650 v3 @ 2.30GHz: b# r) I( C& C1 t7 w, g
(2)查看系统中实际物理CPU的数量(物理)% _8 g( _ q/ e" m9 M
[root@Master ~]# grep 'physical id' /proc/cpuinfo | sort | uniq | wc -l
# S1 ?! r/ G( n% o1 c& J# T2
% |; J: ~1 Z1 }+ }4 S# B' j(3)系统中实际物理CPU的数量(核数)
9 w: a% O3 C- i[root@Master ~]# cat /proc/cpuinfo |grep 'processor'|wc -l
$ A4 c3 }/ A, ^/ {( Q0 P% q' E. \40
R$ r( V# l; @* o! q b (4)查看每个物理CPU中core的个数(即核数)8 n8 i9 \4 x# `: x
[root@Master ~]# cat /proc/cpuinfo |grep "cores"|uniq
( Y: i. i, p3 N- J5 Bcpu cores : 101 z3 M0 ?1 z/ ^2 J, N
(5)查看CPU的主频1 M, C z# B( B' P2 w! i# S
[root@Master ~]# cat /proc/cpuinfo |grep MHz|uniq ' O5 ~5 {7 t$ g4 o0 A/ o
cpu MHz : 1200.0003 L+ g$ o) q- r+ n7 G3 n
cpu MHz : 2300.000
) e% M4 p/ G' v0 ], Mcpu MHz : 1200.000
% a$ y) w0 ?: q# M. d" F(6)查看CPU的详细信息
2 ^, D8 A) f* H/ _: F1 b* b' j复制代码
0 O2 Q" S' `+ J! ^复制代码
W7 Y; K' i! T1 X: T$ p% w[root@Master ~]# cat /proc/cpuinfo | head -20
7 a; E2 R5 Z) \( n5 U6 ?processor : 0 //逻辑处理器的ID
3 G" a8 ^% G5 mvendor_id : GenuineIntel* |# w) c) D D- n: }
cpu family : 6
4 c4 _2 [- ?9 p7 y: f" M5 U5 |2 A" |model : 63
^( a' ~3 t' i' l. q ^ N2 i1 v6 Omodel name : Intel(R) Xeon(R) CPU E5-2650 v3 @ 2.30GHz //CPU型号( T! C c2 s4 W
stepping : 2) P7 h- p+ T! B) R
microcode : 549 H' i. u+ }) \1 D
cpu MHz : 1200.000
/ G$ R; B2 ]4 G( s4 l3 \8 kcache size : 25600 KB+ P% h2 }& S* \$ ~& E( A
physical id : 0
$ ]' v" I8 R ^/ d0 _. U K. Dsiblings : 20 //相同物理封装处理器中逻辑处理器数
( _5 P: v0 n% gcore id : 01 ^$ I8 T( N- @. u# a9 B/ A
cpu cores : 10 //相同物理封装处理器中的内核数. x2 d6 V6 @" c- Z- }; z; P" \) s
apicid : 0
8 u" |; z* g8 t+ N) U+ n. Yinitial apicid : 0
5 M; D4 h4 I" v1 |8 k* }$ Afpu : yes( u+ u) A' V8 A
fpu_exception : yes0 [5 R: R& ] k
cpuid level : 154 d: t& _* f- ?" ]( d) O& V0 ^
wp : yes
+ y. _, _5 K& Qflags : 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 xtopology nonstop_tsc aperfmperf 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 ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase bmi1 avx2 smep bmi2 erms invpcid cqm cqm_llc cqm_occup_llc
! T) z7 E3 D; c: \复制代码1 y& Q! \' l4 a/ ~# T+ ]
复制代码
! r; o% u% n/ c) f; W5 E: b1 R (7)查看CPU的相关信息
2 T2 s! y4 ]2 t复制代码
( |6 X! _& M' P复制代码& e+ u) Q& V# w0 g7 U
[root@Master ~]# lscpu4 w$ m* J6 o; D
Architecture: x86_64
+ r+ \: k; F, d, T3 |0 u8 TCPU op-mode(s): 32-bit, 64-bit
. s: H# j. o# cByte Order: Little Endian9 N+ [4 ~! g2 }* W J3 f
CPU(s): 40& L" K* q; U! @. B$ B# ~
On-line CPU(s) list: 0-39. `' r* }, X) x; `
Thread(s) per core: 27 y4 ?3 E: o% C! u6 l
Core(s) per socket: 10
) w& c# A$ l6 N+ p2 t% \9 NSocket(s): 2; j8 Z8 i- f. b
NUMA node(s): 2
. ]! p5 C2 ^2 Y' K! G. z+ ^Vendor ID: GenuineIntel, E8 ^; U% ?1 P8 ]3 k
CPU family: 62 x1 n2 s) _5 I& B3 X5 R1 m
Model: 63/ w( U1 R9 c. U9 p- M+ L2 \
Model name: Intel(R) Xeon(R) CPU E5-2650 v3 @ 2.30GHz
' _2 t. O. [/ u* YStepping: 2
" l5 V, w9 k9 m& L/ @; b/ vCPU MHz: 1200.000& O+ R* p r6 ^3 G% [& x! |! ~
BogoMIPS: 4594.434 I; k: A# f3 s" q1 l
Virtualization: VT-x' t( I) i* J' v& w7 ^( q
L1d cache: 32K$ X6 u7 W0 H( A9 L- A
L1i cache: 32K
! N, U: B! C7 R, d1 nL2 cache: 256K
7 O% D3 R% e! @ ~& p# UL3 cache: 25600K
. d" a& x. }3 { y- G1 ^; JNUMA node0 CPU(s): 0-9,20-29
* o9 L. ^: f4 f2 [ A1 vNUMA node1 CPU(s): 10-19,30-39 X& d7 d& O5 P4 A4 y% [2 N
[root@Master ~]# ! V% x$ H! C6 h$ Y5 C L; A' _! Z
复制代码' Y" ~" B- ]9 _) g2 x3 N
复制代码" O& Q) I C: l% W3 k+ s
(8)查看cpu运行模式
, M* X4 V- w4 V7 H* O$ R[root@Master ~]# getconf LONG_BIT' ?( t3 t' g3 s& F
64
! |2 I( ]+ ]1 t: u! @% G (9)查看cpu是否支持64bit/ W0 i, k1 f+ \1 b9 L5 z" R
[root@Master ~]# cat /proc/cpuinfo | grep flags | grep ' lm ' | wc -l6 ]" u0 `- e) e+ ?7 U9 ^0 ^7 P
40# E! _! P6 C' G2 ]
(结果大于0, 说明支持64bit计算. lm指long mode, 支持lm则是64bit)( t6 H4 A' h6 P* l2 h
; @* \" s2 C+ ^+ ~ V三、查看内存信息
% W2 Y5 ]1 V: a(1)查看内存硬件信息& u$ N8 p6 j- I( T# l9 S
复制代码
( p- {9 p9 Z2 H4 I4 q! s; D复制代码3 H, ~7 l) v& U' |" A9 Y; T
root@Master ~]# dmidecode -t memory | head -45 | tail -24
3 B% M8 l1 K8 P2 |4 G3 |1 ~Handle 0x000C, DMI type 17, 40 bytes) Y/ T; t7 w1 r5 N) h2 P
Memory Device; r- |7 p/ L/ Y, b8 Z
Array Handle: 0x000A
1 A; o$ z2 p- d! } Error Information Handle: Not Provided6 w6 X; r- X8 l' I0 W' b+ J$ {
Total Width: 72 bits
. }: w" n4 G- X Data Width: 64 bits' {6 p2 E l0 S: G2 H/ |$ v
Size: 16384 MB
& v5 N( G. n4 \# n A% D. t Form Factor: DIMM
& q! M9 c9 e$ q; z/ F. A" a; A0 w Set: None
( a" q6 s- z8 p+ C1 [0 W- R Locator: PROC 1 DIMM 1
! _- D% ^% a7 ^" j: h Bank Locator: Not Specified% M/ ^! `/ U( b. J `
Type: DDR4
+ P( y; ]7 l8 X* F Type Detail: Synchronous Registered (Buffered)2 p9 d- E" v6 d+ r% S
Speed: 2133 MHz P! E* j; z- @* P
Manufacturer: HP
; ^$ r# |, l* R8 e1 M' k b8 B Serial Number: Not Specified
+ E- u2 i7 E( O! y) I, } Asset Tag: Not Specified0 L; \( @0 X. k6 H. _
Part Number: 752369-0812 S$ \+ b6 b, @
Rank: 2
' c5 a* ^* H" J! V6 {' F, m Configured Clock Speed: 2133 MHz
" v% T4 s2 ]( [9 h, d Minimum Voltage: 1.2 V/ I! Q9 |5 ?) q- W
Maximum Voltage: 1.2 V
5 p! V5 `% z+ r9 l, C, I! M: D1 C Configured Voltage: 1.2 V4 v6 e; V4 M. j/ ]2 M+ J6 k# H
复制代码
9 D" j* V- d/ W. |9 P9 l& C5 U( b复制代码' c9 G0 u5 Q9 F: z
(2)最大支持多少内存
$ w& C% ]3 `% p. h[root@Master ~]# dmidecode|grep -P 'Maximum\s+Capacity'
4 L- r# m. M' v: \* T) o i0 z+ B2 j
(3)Linux 查看内存的插槽数,已经使用多少插槽.每条内存多大: q) v/ q! ?" N: ~4 V( P5 s
* G9 ?& a% a/ X, C' n
(4)Linux 查看内存的频率:9 I7 O; r5 Z, g- S2 w
[root@Master ~]# dmidecode|grep -A16 "Memory Device"|grep 'Speed': ~7 B7 G6 x& x9 X' o8 ?
' ~$ A2 d' l3 f# H5 Z: c
(5)Linux 查看内存的详细信息:
/ {' m+ r" K3 \! P: {% k# Z- F复制代码. }# `7 j& E8 c+ Y/ ~
复制代码
0 |/ u$ u! b2 M[root@Master ~]# cat /proc/meminfo |head -20# Y n5 p! G( b# `1 o
MemTotal: 131897620 kB
4 s3 x; O& M# p- zMemFree: 414124 kB
8 n% A7 I1 d; s: oBuffers: 1040560 kB
$ M- e( E- \% o" B* l) V4 Q6 PCached: 111083180 kB
6 S, w4 Y) _* J% A. c0 @SwapCached: 1320 kB
. C, f7 Y" a5 N* I; H* CActive: 7637912 kB# |" d4 s1 c0 f3 v1 l5 L% o8 x
Inactive: 110607108 kB
: t" f% X! P4 z/ iActive(anon): 4406900 kB) H8 p) w9 n3 l
Inactive(anon): 1714900 kB
+ h* |. k$ \, K3 i X; ?Active(file): 3231012 kB
, o4 @6 ?" w7 [% |Inactive(file): 108892208 kB
9 y8 I4 Q* m) q3 m* ?' eUnevictable: 10878976 kB
* B. B5 M2 {" e% e; OMlocked: 5521652 kB
0 ~* m4 A" C$ x( VSwapTotal: 16777212 kB$ h9 H' Y0 w& `: r% E& i$ P# _0 m. {
SwapFree: 16737536 kB
5 C* ], O1 }7 [8 x5 Q* BDirty: 180 kB
}) w m8 w4 T# tWriteback: 0 kB
+ n' @* U+ T2 i# y) i- e" NAnonPages: 16999324 kB+ ~; d1 S0 M2 _& r
Mapped: 149020 kB: p$ X: g- K. J* ]4 G5 x
Shmem: 172 kB
' G1 d' e; U! [7 f$ o( U复制代码
5 u. B: X1 y9 u9 }0 I复制代码0 }0 A' r5 ?: R- A
(6)Linux 查看内存的使用情况
1 t# E5 o; d, n2 F8 a7 ~ ?[root@Master ~]# free -m // -b,-k,-m,-g show output in bytes, KB, MB, or GB
4 x: s" n) m$ h' ?4 X$ N total used free shared buffers cached
1 T V! `- F9 T" n/ [( s9 ?Mem: 128806 123407 5398 0 1015 103474
8 _: F. b a1 {7 T6 M-/+ buffers/cache: 18918 109888
7 Y3 z, C+ l: S `" J bSwap: 16383 38 16345& q* M/ i6 |: ^! r% M& J
$ K% J( g; \4 @5 g; y
四、查看硬盘信息6 \! E% _! a; k3 {5 s8 R' f% ^
(1)查看挂接的分区状态- h9 u4 J0 @$ V/ g7 r* T
[root@Master ~]# fdisk -l |grep Disk
8 d! V: |+ D: s$ l0 R3 U0 ^2 N
% f q4 |9 ]0 v3 E$ I d(2)查看硬盘和分区分布
2 n4 \, S$ B, @& h: i) b复制代码
3 t$ k7 |1 V+ o% g1 t" K复制代码7 @" N$ _0 Y5 {2 @" z8 w8 v
[root@Master ~]# lsblk
/ N) T- A9 A( e9 j5 {' y3 zNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT$ U- z9 n6 r3 K$ }
sda 8:0 0 279.4G 0 disk + b- t" d9 k8 s
├─sda1 8:1 0 50M 0 part /boot6 Z F, X; V- Y6 i" i
├─sda2 8:2 0 100G 0 part /1 }# s5 }! H+ f$ g) \# i9 C
├─sda3 8:3 0 50G 0 part /home
1 J1 Z$ S$ T& W+ f, B5 O├─sda4 8:4 0 1K 0 part
; T! Y$ ~9 l, V( C$ s├─sda5 8:5 0 16G 0 part [SWAP]
) k7 k6 N9 f) V7 c' W8 O- q3 [% `├─sda6 8:6 0 13.3G 0 part /tmp/ U# ^/ L7 N5 s
└─sda7 8:7 0 100G 0 part /usr1 ~9 X8 `% p2 u
sdb 8:16 0 83.7T 0 disk
: P" I4 z7 S, b0 `/ l└─sdb1 8:17 0 83.7T 0 part /PureDisk# N- S9 ~! a7 k9 j$ D9 V
复制代码/ Y: G1 @0 V( J
复制代码7 D$ g8 r# [+ D9 ]0 N6 g/ X
(3)查看硬盘和分区的详细信息
, j- A0 W% Y8 }4 i复制代码) e% R. X3 _ Y; [2 s
复制代码* x8 c5 h8 q( ^' _
[root@Master ~]# fdisk -l ; n! [( ?% _& z9 V
Disk /dev/sda: 300.0 GB, 299966445568 bytes
& C6 t; z8 [3 \* O" `" [6 n' J255 heads, 63 sectors/track, 36468 cylinders
& | ^6 _% ]. {3 c" d" {5 ~Units = cylinders of 16065 * 512 = 8225280 bytes
9 o$ j9 p: A5 v/ hSector size (logical/physical): 512 bytes / 512 bytes
$ g2 i: I) }! G, O% n1 M# X4 L* j# vI/O size (minimum/optimal): 262144 bytes / 262144 bytes; z+ i2 G" W7 y6 c' ~$ k c% T
Disk identifier: 0x000384d9
$ m8 U2 U; j8 e' {0 ]) g. [8 e Device Boot Start End Blocks Id System
5 A3 E* A* [+ u* S6 X0 c- s# Z. ^/dev/sda1 * 1 7 51200 83 Linux: t$ X& m v+ }5 n! v) D. z
Partition 1 does not end on cylinder boundary.
! y& X- t6 `6 m4 S/ J0 w/dev/sda2 7 13061 104857600 83 Linux
/ l5 c& r- v1 t0 d/dev/sda3 13061 19588 52428800 83 Linux' T+ i/ Q6 [7 B3 c: o) Z
/dev/sda4 19588 36469 135597056 5 Extended; H; b% N s; y0 u: k: J: ~, S% p
/dev/sda5 19588 21677 16777216 82 Linux swap / Solaris
# M' [4 ^; Y0 o+ C5 F$ `/dev/sda6 21677 23415 13962240 83 Linux
9 N# v4 a: K" h& L2 K. J% T9 b/dev/sda7 23416 36469 104854528 83 Linux! \4 r! M% n3 m$ u& n
WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.$ f" B, D' L& l4 e. c0 J. O
5 B) y7 [- T3 h! w8 q1 kDisk /dev/sdb: 92017.3 GB, 92017310654464 bytes3 q% v4 Q* ~4 x% S1 m: s
255 heads, 63 sectors/track, 11187134 cylinders
7 a& h# ~1 j0 QUnits = cylinders of 16065 * 512 = 8225280 bytes! ^" M V8 F( ]: x& x7 h2 f6 g
Sector size (logical/physical): 512 bytes / 512 bytes
' `1 R9 _' R J6 |I/O size (minimum/optimal): 262144 bytes / 6029312 bytes( P& z3 w/ j$ C+ u) n. K$ u
Disk identifier: 0x00000000
5 O. A3 | N# m' H2 R& Z) D" p j Device Boot Start End Blocks Id System q! E3 s! ?# K v7 z6 P3 }- y
/dev/sdb1 1 267350 2147483647+ ee GPT' D0 R9 {) W2 T, C# r) M# _
Partition 1 does not start on physical sector boundary.! g& X: J5 n" p# n2 U6 M
复制代码
6 r7 z0 K& |$ d( ]/ r h复制代码: ~& M7 ? G/ @' ?4 S
(4)查看挂接的分区状态$ ~# w* c" k+ G' n4 t$ g
复制代码
& r& w# Z4 W* ]5 K) W复制代码
7 G0 `3 f/ g8 ^0 I) Q9 P7 X9 q[root@Master ~]# mount | column -t
7 \& Y& g9 {0 U6 B( F5 C/dev/sda2 on / type ext4 (rw)
" w1 _' c3 V6 Z( q. L7 cproc on /proc type proc (rw)
1 H/ _7 M$ {, n! R3 h$ ~sysfs on /sys type sysfs (rw)
# A. S; n5 b. p: ndevpts on /dev/pts type devpts (rw,gid=5,mode=620) ^3 |) G& p0 U) p# q
tmpfs on /dev/shm type tmpfs (rw)
' h5 o0 W& ~4 p, i3 ]/dev/sda1 on /boot type ext4 (rw)
8 d* g9 ]9 L9 z ^/dev/sda3 on /home type ext4 (rw)+ g. _5 s9 M. N
/dev/sda6 on /tmp type ext4 (rw)
- b" K' b( A/ @. }/dev/sda7 on /usr type ext4 (rw), ]7 f& P. h: e- E$ U& E
/dev/sdb1 on /PureDisk type ext4 (rw)/ e ]) `* |$ Y! g& a5 B
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw3 m% p5 B1 J2 Y. E, X0 t; w* G
复制代码, [; t8 P$ z& k; Z
复制代码
' X- h4 H3 g3 G; ~( j2 l (5)查看挂接的分区状态
) R. Q4 B) J( x/ L0 Q' {[root@Master ~]# swapon -s
- p( ?" ^5 o' z9 n6 H( w8 U8 }/ GFilename Type Size Used Priority* J: S. X! ^+ _: g) P3 M3 W, A
/dev/sda5 partition 16777212 39676 -1
( f7 ~0 w& |1 A) Z (6)查看硬盘使用情况 h& t x; e; T/ A
复制代码
# d7 J: D, n& g3 R$ X复制代码# N% Q$ |5 C; w% i" q; F% Z1 g! N
[root@Master ~]# df -hT
8 Z8 T! I5 m+ Y0 A% eFilesystem Type Size Used Avail Use% Mounted on0 X7 x1 U' z; e% H( L* U$ n) T
/dev/sda2 ext4 99G 561M 93G 1% /
3 i* M8 F8 P& |& v5 Q/ B7 G- @7 `1 M9 [tmpfs tmpfs 63G 76K 63G 1% /dev/shm
# P, {3 o& C5 [, @# M \ F% ?/dev/sda1 ext4 45M 38M 4.9M 89% /boot
( E2 D; d! y! k# j% O' J/dev/sda3 ext4 50G 52M 47G 1% /home
0 Z( c- h s; ^' U' s; Y" h/dev/sda6 ext4 13G 34M 13G 1% /tmp$ W8 x9 V9 H; k. m
/dev/sda7 ext4 99G 21G 73G 23% /usr& b0 v, F0 `+ H6 O5 A' s
/dev/sdb1 ext4 84T 41T 40T 51% /PureDisk) l) h/ n4 M L. C# k4 t
复制代码- G- |" a: x9 B X
复制代码
' P: k6 s1 f0 i! r* T (7) 硬盘检测命令smartctl* r* M- p) `9 D2 `
复制代码( L( l% @. F5 c" t* V
复制代码. s; K8 e/ u2 Y5 y) c/ r& ~6 s( J
[root@Master ~]# smartctl -a /dev/sda
- J& C' D/ f3 I2 v( V8 b( ^smartctl 5.43 2012-06-30 r3573 [x86_64-linux-2.6.32-642.el6.x86_64] (local build)
! t4 a& B: ?2 [' R. C; ]Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net2 }6 M4 }+ C# m t# V
Vendor: HP
+ ~. [$ u6 `/ c! ?$ L( BProduct: LOGICAL VOLUME 0 O; f8 R) u" ?2 d
Revision: 3.56
5 D2 r9 j% e; b# {% e/ LUser Capacity: 299,966,445,568 bytes [299 GB]. W8 Z& V/ s+ L+ S" S2 ~
Logical block size: 512 bytes" Q5 e3 z/ m& J) J, s% ~
Logical Unit id: 0x600508b1001cc8a1b9ec4dacc5ab35dc6 z; T1 W) c, H' m2 _& [) \4 q* E
Serial number: PDNNK0BRH9U0AG $ ` e8 s! d' F( ], U2 m, K
Device type: disk
) V7 U+ \; Q0 p" ]9 ~Local Time is: Mon Feb 5 13:13:33 2018 CST
* t6 [" ]* U$ @& T/ ?: ODevice supports SMART and is Enabled
1 q" ~9 d2 S4 k& rTemperature Warning Disabled or Not Supported5 N# g" x' ^% V4 O% x- u, V
SMART Health Status: OK& g. |' O; Q4 l2 V
Error Counter logging not supported5 ^ B n% T- b/ a4 ?5 h/ }9 G9 @
Device does not support Self Test logging
" z3 }' i4 f3 I复制代码
[: M7 U7 l; c* w2 k复制代码5 \$ ^& g1 x, b8 I. m0 i; T8 {
+ y8 l( ^' Z+ S. t7 l+ O& @5 Z五、查看网卡信息8 a+ ]# {3 p% G2 w! B J. \
(1)查看网卡硬件信息; e$ d/ `3 s0 ~' j( N' [" s
[root@Master ~]# lspci | grep -i 'eth', L! s# F! e/ M/ ]5 F( y. d* H
4 d9 _ j8 y1 V9 m5 J$ c8 s
(2)查看系统的所有网络接口# ~, s8 p7 G+ m( e( i
[root@Master ~]# ifconfig -a3 @7 ]6 g- P! T$ W) N! }) J
[root@Master ~]# ip link show
; q( q8 K0 ~& E& `; X (3)查看某个网络接口的详细信息,例如eth0的详细参数和指标
, z# o9 r c% h; k复制代码5 P" \- s; @% C7 D! N4 Y% C
复制代码" l$ O/ u1 D/ H! l2 e9 Q8 q3 Q
[root@Master ~]# ethtool eth0/ e" ^5 \( g; Q4 `8 J8 d" d: O
Settings for eth0:( s/ H* s- X5 X3 |- u
Supported ports: [ FIBRE ]; i7 a7 f; k$ Y- o+ [3 j* a
Supported link modes: 10000baseT/Full
4 c j: W( }" J7 e6 |) c Supported pause frame use: No3 q; E! f6 _# e6 L3 e! ?
Supports auto-negotiation: No
! Y b8 L* q9 _; }+ Q) c Advertised link modes: 10000baseT/Full
3 n% U2 ]6 u# O4 \1 T- i6 f7 w6 l4 h; j Advertised pause frame use: No
y: G4 v, T( I% f Advertised auto-negotiation: No
$ v* U) ^& V, y, ]( L! V$ z Speed: 10000Mb/s
) I4 X6 H$ p* _ d6 ~3 e Duplex: Full
9 Q; v1 \* }7 R, I Port: FIBRE9 X# a" a% E2 m% K
PHYAD: 0, J! f1 V j$ [! ]2 b7 `- i# m( O
Transceiver: external9 Y# k+ T. t* s; p1 W1 s
Auto-negotiation: off
# ^5 `' Q: X2 f, c9 r0 m Supports Wake-on: d6 M! V6 j" ?) e b3 {- h
Wake-on: d
& ? l8 Q" ^' j: ?0 {8 J Current message level: 0x00000007 (7)
4 J. I" ]. T, D, a drv probe link8 P k+ b! G* x- a( z; m1 p
Link detected: yes
' e6 T* a$ E9 g! w' @2 k: l复制代码6 u2 x. b8 Y5 i( I4 P8 V
复制代码; A* [4 ~6 Y! z% Z
(4)查看所有网卡的链路状态: m- Y. g1 u6 e, I( I% i E
复制代码. _/ j/ Q' S% j! _, y J
复制代码. S# J# u9 Z' r; M0 D* ]& P [
[root@Master ~]# for i in `seq 0 9`;do ethtool eth${i} | egrep 'eth|Link';done
3 ]1 s( I1 y3 V! h$ l' aSettings for eth0:0 p" y6 v* n" K r
Link detected: yes 0 K$ d/ g) E7 `. [7 ]6 }
Settings for eth1:
2 R7 n" O! u* ]% U Link detected: yes' H( b- d; ^ W2 V7 e7 h
Settings for eth2:4 W2 ]( L* k7 t- p: g
Link detected: no
% J1 t8 S5 |# u6 O9 S# \3 pSettings for eth3:
7 n& k/ p [8 V0 _6 k2 e* M& i5 t Link detected: no
. v2 F( t9 j6 V) jSettings for eth4:
4 @: ?* m1 k+ L4 a5 P Link detected: no
5 j! U% N, E/ CSettings for eth5:1 i& @9 h% s2 h0 L
Link detected: no8 k K' n8 u" M* t
Settings for eth6:
7 d2 i! C- G) S3 |. V# f Link detected: no" M& I0 i0 y2 X( z/ T/ Y6 ~- ~
Settings for eth7:
( H- [; A& e! f2 p% ^8 \ Link detected: no
- v I! p# x0 \1 t! h7 lSettings for eth8: T4 u& v+ }+ E+ F' f* \% C4 o
Link detected: no, c; M1 A: E9 _$ V4 R2 ]: j
Settings for eth9:5 [: t( J) o, {- J; N" r
Link detected: no& |- U$ k% V# c, |- w& C$ d
复制代码
* M8 n- Z: r6 H4 I1 Q复制代码/ F* f7 w3 o. T; w; z' R1 j. J
; U& K% t7 c4 U2 L 六、列出所有PCI设备信息( Y! J% Q* }( s9 l7 c0 W
复制代码% z0 U8 m1 [/ _; X
复制代码
; \0 N& Z# o) W; c- @ p[root@Master ~]# lspci -tv | more
5 i! a' @( v& x! x0 }3 S: g-+-[0000:ff]-+-08.0 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 QPI Link 06 f u9 k" _0 @' P' n
| +-08.3 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 QPI Link 04 K' |: E" N: m9 ~' T
| +-09.0 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 QPI Link 1
% `8 l5 Y6 ] E8 m( p- z, D( g( \7 K | +-09.3 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 QPI Link 1
3 o) O+ O, x4 Y3 [* b5 ~: z- a; H6 U | +-0b.0 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 R3 QPI Link 0 & 1 Monitoring
. L3 h; M7 ?: E4 S/ I% { | +-0b.1 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 R3 QPI Link 0 & 1 Monitoring
! D$ |* e& `. [. ?9 O: Q | +-0b.2 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 R3 QPI Link 0 & 1 Monitoring
# Y7 V& T# r' n( f: d/ I/ t; h | +-0c.0 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers# N: ?( u6 I, l* W/ {
| +-0c.1 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers
9 Y6 B5 |5 G9 T+ Q! b+ p: a | +-0c.2 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers
% i. Z' l! n$ M: b | +-0c.3 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers9 ]& S/ |8 Y8 l1 S( d7 f" h
| +-0c.4 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers: S- N# e3 L$ @3 J
| +-0c.5 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers) E% @- C: l* O2 P. D6 u' D, y
| +-0c.6 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers
6 v; w/ L) b7 P | +-0c.7 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers v/ P H" k6 p% l2 g8 H
| +-0d.0 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers
6 G9 W: \0 O3 X5 {# x" d | +-0d.1 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers
- V7 [0 h. y8 ~3 } | +-0f.0 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Buffered Ring Agent. ]4 y7 P& }8 n9 r6 m% e7 z' z
| +-0f.1 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Buffered Ring Agent' f# y' N2 Z/ M
| +-0f.2 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Buffered Ring Agent+ ~8 l) Q7 C5 E( P/ ~$ y
| +-0f.3 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Buffered Ring Agent! _, Z' W# E$ ?) N
复制代码
9 l+ R; B" {1 l0 v: k5 D' }$ i - A1 g7 L0 M* _. t
复制代码$ p& e9 k5 Y; L# G* I) `8 j! e
( W- W3 `' K# g/ g4 C% X
end
1 O0 o: o/ U1 y2 P9 L( ?CentOS 8 U盘安装及Installation Source报错和ssh报错的解决方法/ i, @/ _1 f" Q+ l Z( @
|
|