|
|
CentOS 8和7版本对比
3 W) z& D3 F; Y. {( o* u
% J2 l7 X7 s7 J5 E# p% F9 |功能 CentOS 8 CentOS 7' ~2 ]/ ^0 H( W1 P$ s, a
内核版本 4.18.0-x 3.10.0-x% p- t9 B! h) i: n; p/ j( p" `$ l
文件系统 XFS XFS
, r0 k4 w/ o! i7 Y3 b时间同步 只支持Chronyd 支持NTP和Chronyd
6 w( t( p& J$ U文件大小 8EB 500TB- a, W V0 f, }4 v
文件系统大小 1PB 500TB
9 \" O! ]3 t9 `4 a包管理工具 DNF(YUM v4) YUM(YUM v3) D* s+ K& E; @1 F3 Z( _; w
最大内存 24TB 12TB3 C3 y; T. z: I$ ~9 X' A- k
防火墙 nftables取代iptables firewalld底层使用iptables
& I! b' C7 G" M( O A支持架构 支持64-bit ARM 不支持64-bit ARM& w0 h: w+ w6 q
网络管理 默认安装Cockpit 无默认安装3 g( K& I- g( p. |% |' k
CPU日志 CPU日志记录在journald进程中 CPU相关日志位于/var/log/cups目录
8 e* D" v) B0 I4 ]/ e8 ?发布时间 2019-09-24 2014-07-07- e/ H6 g. j9 f! E) z4 U4 K; K
完整更新 2024-05-01 2020-08-061 [) ~4 N8 K7 E5 L9 d a& S
支持IPv6 支持 Ready Logo Phase 2
; E+ Z: R/ s/ k; `Git 2.18 1.7
8 H3 ~* G( P9 f' b* S5 KGCC 8.2.1 4.8.5
`: l$ p/ { b# sPython 3.6.6 2.7.5
& x S& ]. g: J3 r4 CGlibc 2.28 2.170 ~9 I6 b. S; P0 O `5 M2 L
Boost 1.66 1.53
/ v# F# T& |) o+ m XLLVM/Clang 6.0 5.0
1 X. v" F) `8 [, m( wd
+ J. I& n7 l. p- a( a# \Linux查看硬件信息命令; x6 |2 S/ T& t9 U' T4 v
一、查看服务器硬件信息
) z! s8 ?, W+ |& v8 D3 i% w* a(1)查看服务器型号、序列号
9 q' S4 ]3 R) ]0 |6 f+ b& k, r3 D[root@Master ~]# dmidecode|grep "System Information" -A9|egrep "Manufacturer|Product|Serial" ) W" I% Z; E7 h! D# Q) X
z5 z- K+ U* i) }) |* N (2)查看主板型号0 [2 r/ @) _( l. h5 G
[root@Master ~]# dmidecode |grep -A16 "System Information$" * f; M! P9 \ s- n8 x$ H* p
7 v8 [ n+ a1 Z: m+ U7 ~* B k! z
(3)查看BIOS信息
/ a9 {7 B7 y5 N7 I2 t! j复制代码
, L3 G0 u- L2 I! p1 x' Q$ [3 F复制代码
^- v6 l W1 ~$ }# M5 i9 ?[root@Master ~]# dmidecode -t bios
( C8 y& Z5 |6 [# dmidecode 2.12
6 N# Z/ s1 d* @2 [# W1 OSMBIOS 2.8 present.+ ~0 {0 ]7 y' s P5 b: H7 b. `
Handle 0x0008, DMI type 0, 24 bytes$ ?* d/ @9 {# B: z( @
BIOS Information6 Q% C+ ], q# i+ s: b
Vendor: HP
4 l) ~. I4 p! W! ?& i1 d/ s; a Version: U19 X5 q; @5 E8 ^8 f
Release Date: 12/27/2015* Q2 Z0 F" p8 c3 G0 y0 i8 f7 R/ Y
Address: 0xF00006 g* Z5 d5 L5 l. g1 c$ J* }1 o/ [) A
Runtime Size: 64 kB
. \3 u& d5 J: \8 z- Y ROM Size: 16384 kB. p: ^" c3 G+ s
Characteristics:& g* u+ o6 |5 I& [( {8 j
PCI is supported
. M5 F+ f) l2 o' { PNP is supported
" J4 x: ^) C! C7 R3 E BIOS is upgradeable1 }- u( q/ R* f! M& ]6 q: g
BIOS shadowing is allowed* L4 q' E6 I, X& y; m
ESCD support is available9 f' l3 y" h m
Boot from CD is supported3 k) s) g/ N" W. E7 K, [
Selectable boot is supported
% ` t0 C$ q: Q1 Y, e7 C# Z" d0 c EDD is supported
~/ z" J# w1 [ 5.25"/360 kB floppy services are supported (int 13h)
3 b5 ^8 k( l9 C9 X$ \1 [) ? 5.25"/1.2 MB floppy services are supported (int 13h)6 `8 n: S4 G! @: e3 [
3.5"/720 kB floppy services are supported (int 13h)& ^' G/ m' D& Q
Print screen service is supported (int 5h)
; ]7 L3 q4 p* b 8042 keyboard services are supported (int 9h)
3 ?' q* Y- b% W! J+ |3 z Serial services are supported (int 14h) C: E1 |6 t6 c
Printer services are supported (int 17h)& F, h+ q+ Y! y
CGA/mono video services are supported (int 10h)" i9 ? t! q! D3 v8 ?- G
ACPI is supported
, K3 b/ s8 z3 e6 S% e4 { USB legacy is supported
( l( H- C7 y( D- o7 e" d BIOS boot specification is supported
) b/ E: F5 U/ S4 y S4 p Function key-initiated network boot is supported
I2 k! m! n3 x1 \6 b$ N, Y4 j Targeted content distribution is supported
! z4 v8 T) m. `. v. o; f, x UEFI is supported# W& J9 ]( I0 k" B3 t
BIOS Revision: 2.0
% j9 H" L f5 R5 V Firmware Revision: 2.40
d2 J: ]( U+ ~! `/ T+ r3 K b复制代码
( J' F& k7 x5 v. O) U/ q复制代码
: O; f& y) c9 v% Y, E (3)查看内存槽及内存条, p" n! }6 b0 ]) N2 y2 w( Z1 K b
复制代码' j6 S8 A$ [8 F- C0 V
复制代码
$ a+ r# W7 s" D \/ L; {9 a$ ^[root@Master ~]# dmidecode -t memory | head -45 | tail -23# j& g/ j0 [7 n% z4 M
Memory Device
1 W8 Q. Z6 a2 i/ g' M8 R Array Handle: 0x000A
# |1 t6 Z! |- w+ b1 n Error Information Handle: Not Provided
; p6 I' P) f K# z$ h Total Width: 72 bits8 X8 x- J2 F, ]0 ?; G9 D
Data Width: 64 bits3 w' t+ R1 a4 ~' |% o' |6 J/ [' d
Size: 16384 MB
# r' C o0 Q _0 P! p8 E1 C7 C Form Factor: DIMM9 o2 U! x, Y4 F0 j! t& E
Set: None
$ W4 U! W7 V$ T Locator: PROC 1 DIMM 1 }4 ~, ~ u( }+ M
Bank Locator: Not Specified
, H! I" u! _, p+ { Type: DDR4
, f M1 T" m( \1 n( r8 O Type Detail: Synchronous Registered (Buffered)4 Z- b" V7 j$ j4 _5 a
Speed: 2133 MHz
; }& u! Q# Y6 t. X! n# i( k Manufacturer: HP ; q$ R7 y; z6 b) |: x# v6 L7 x. f
Serial Number: Not Specified
# w, i8 n# R6 i. \! d Asset Tag: Not Specified1 M5 u3 i ]. _9 g
Part Number: 752369-081; @% z4 y/ y2 k
Rank: 2
/ H( D* B8 _0 u* ?, |: p$ ~5 R' ? Configured Clock Speed: 2133 MHz
& N8 H6 c$ d! q3 J6 t6 A$ O, G$ P Minimum Voltage: 1.2 V9 q7 v; ]3 o: X% b* ^6 k" h
Maximum Voltage: 1.2 V# U% }2 v/ r: V- D$ G& h Z5 m
Configured Voltage: 1.2 V
; j+ b! c& C$ |$ }" e d[root@Master ~]#* q6 O; o4 A0 v' a
复制代码$ f% B7 O7 M# S4 }/ P- {( w
复制代码4 T$ L( J O; E4 g' H
(4)查看网卡信息
4 w* E2 p; g/ {复制代码
o; d, J* ^6 z& F3 Y+ v/ `复制代码
1 T9 q( c5 ?6 R6 O0 i, S/ H[root@Master ~]# dmesg | grep -i Ethernet" d$ E z" w' _4 L3 i- }
igb: Intel(R) Gigabit Ethernet Network Driver - version 5.3.0-k
V8 i# I! ?3 Nigb 0000:04:00.0: Intel(R) Gigabit Ethernet Network Connection* _0 o: \. I( w3 V( m
igb 0000:04:00.1: Intel(R) Gigabit Ethernet Network Connection8 `+ T- t, X& C1 ~6 Q. j5 b7 h/ D& b
igb 0000:04:00.2: Intel(R) Gigabit Ethernet Network Connection
2 L7 t3 q+ {/ Higb 0000:04:00.3: Intel(R) Gigabit Ethernet Network Connection
, l( @! `# ^5 f; n- H9 Pigb 0000:02:00.0: Intel(R) Gigabit Ethernet Network Connection
2 c% g9 B( ?6 G, ~! E E! L8 N- E Figb 0000:02:00.1: Intel(R) Gigabit Ethernet Network Connection
$ ^$ u! a3 Y. z) @' X, l1 i+ O复制代码! A* ]. f# H+ r9 J+ g) h
复制代码4 S7 _- R# V$ [- k, ]& D
(5) 查看pci信息,即主板所有硬件槽信息5 }2 z ~: ^8 J" \5 x
复制代码' `9 J7 F2 y; F, O, v
复制代码
6 X, l+ N% o8 g5 i! W' F[root@Master ~]# lspci | head -10
! _0 R6 R9 w6 a* i$ o$ ^/ _! O00:00.0 Host bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 DMI2 (rev 02)+ x6 A& n' f) }8 f' \- O
00:01.0 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 1 (rev 02)
! y. Q- _& F% x V00:01.1 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 1 (rev 02)) k, I+ j1 b1 U/ f" K. g' P7 z2 G5 B9 f
00:02.0 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 2 (rev 02)$ i: X& Q0 K4 Z0 S' z
00:02.1 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 2 (rev 02)3 [& c' `4 C0 L0 b$ J. d
00:02.2 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 2 (rev 02); I+ T2 J. Y, X, T
00:02.3 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 2 (rev 02): F9 a3 `9 I) C1 G0 Q1 U! ]
00:03.0 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 3 (rev 02)
6 Y6 z |& b& T) \0 h. O/ I00:03.1 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 3 (rev 02)
8 T8 `# a( W; s6 G. N6 W2 |1 k00:03.2 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 3 (rev 02)
) k; h2 K) z' G% e! w复制代码
& g+ O+ @& Z: M7 M复制代码
! ~7 O8 W' W: ]" r
# R% A0 M; i& }' J二、查看CPU信息
0 B" k. I: ]. s- N' Y! g(1)查看cpu型号, r& X n! C% q9 h
[root@Master ~]# cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
+ n) x+ ?5 q" H 40 Intel(R) Xeon(R) CPU E5-2650 v3 @ 2.30GHz* x) C, J8 J6 S1 S
(2)查看系统中实际物理CPU的数量(物理)
7 P7 v& I- ~. q: y M, ]. s[root@Master ~]# grep 'physical id' /proc/cpuinfo | sort | uniq | wc -l
* Z A) s6 I3 {9 D8 G" ~/ t0 b2
) N2 s# }. T5 a5 Y* q(3)系统中实际物理CPU的数量(核数)
' M5 b* T9 I) q9 |& H9 j2 r[root@Master ~]# cat /proc/cpuinfo |grep 'processor'|wc -l
" [! D+ C3 M4 x40- v5 W" R7 K/ V5 e7 l% v' A
(4)查看每个物理CPU中core的个数(即核数)- `) o8 K4 o# n+ c' I+ n- @ m/ [1 q
[root@Master ~]# cat /proc/cpuinfo |grep "cores"|uniq 3 [& a+ \$ R {, k( M! H
cpu cores : 10; A* W% m4 S u2 N2 r) {
(5)查看CPU的主频# I" R* U. f) V1 s# _' m# R
[root@Master ~]# cat /proc/cpuinfo |grep MHz|uniq 6 E! S0 D1 _4 P* t3 ~& W( T
cpu MHz : 1200.000
( Z1 n. Y _: xcpu MHz : 2300.000
- O/ A9 ~7 k% @/ Y( G! fcpu MHz : 1200.000
) W3 k( R* |% d9 b2 j: D(6)查看CPU的详细信息
& {' e a' z0 N复制代码' Q4 v' M. I* M: K* N
复制代码* }0 e9 a4 n2 w- G2 p, |
[root@Master ~]# cat /proc/cpuinfo | head -20
0 ?5 Q2 D$ Y% V) [$ p1 p* G5 Jprocessor : 0 //逻辑处理器的ID
% }% A2 o1 F5 C( s& s0 f" Wvendor_id : GenuineIntel
/ `& Y5 u/ T3 R( f; \! scpu family : 6
s7 l$ J# G0 [, d3 r5 U* [# Smodel : 63! c t: g- ~$ L7 R, p& v, y* {1 h
model name : Intel(R) Xeon(R) CPU E5-2650 v3 @ 2.30GHz //CPU型号
6 I( N2 O% ^6 L5 k' m% ~stepping : 2
5 Q- B% R7 L3 H0 X \microcode : 543 y) j: n2 v% c) l) x
cpu MHz : 1200.000
) Q+ C: ^) v' _4 Tcache size : 25600 KB
& j) n% c4 p3 O+ ~; ]. S! `3 dphysical id : 0
+ U# F) y% ~3 z7 G6 ssiblings : 20 //相同物理封装处理器中逻辑处理器数8 D: b. ^0 G6 ^* |( r
core id : 0
, w. _5 G: E8 U% l' n7 D* {cpu cores : 10 //相同物理封装处理器中的内核数
9 N$ Y) u4 P6 h2 n( ]apicid : 0
7 {$ K0 L2 c$ x5 v) \% ~initial apicid : 0! q& ^, ^+ d5 ~
fpu : yes
4 {: I% j! P! B' s! l$ n0 Ufpu_exception : yes0 G2 j# K4 h3 f7 I# Q1 p% |
cpuid level : 15
# L3 Y& \% y Y* L5 W7 C& kwp : yes
h) G8 e" {6 {7 I6 @6 rflags : 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, t7 J O6 T3 e( ?# m. \2 S
复制代码
+ k/ ^* |- j3 j" J( |2 F复制代码* I, M1 g# {, O- b. Q5 b
(7)查看CPU的相关信息3 m/ L( w. Y* {0 J1 }! f4 F
复制代码
$ s# R7 _' k* [1 b复制代码
- s' k6 {5 l7 d% P& m[root@Master ~]# lscpu
& e4 G/ m! m6 y) Y/ QArchitecture: x86_641 _1 C5 R8 L( r' s! X; j9 m7 c
CPU op-mode(s): 32-bit, 64-bit! ^( U; M+ @0 s! T' ~
Byte Order: Little Endian
2 |8 g+ q, _+ e' C* ACPU(s): 40
1 w8 F1 O& n4 Z7 ~! R g3 R9 SOn-line CPU(s) list: 0-39
+ b, J2 r* ?9 x! m& M$ b. s6 G) GThread(s) per core: 2
9 X0 E: c- W" m* M; `2 d7 ZCore(s) per socket: 10& y, b% k. m& ~
Socket(s): 2
% X' T+ J, y2 ]9 P6 f& vNUMA node(s): 2
+ w7 @: u; `8 h, ]& I: Z* tVendor ID: GenuineIntel* F9 \ R: W! j$ `* i" G
CPU family: 6& {; C" K# D* i; r" n5 }+ `
Model: 63
6 J4 s3 l% [, R+ G% r, SModel name: Intel(R) Xeon(R) CPU E5-2650 v3 @ 2.30GHz
3 ]. n' y4 j" ^- o* U2 tStepping: 2
+ j, a4 `6 J$ o, v' t5 tCPU MHz: 1200.000
2 [9 F0 g+ r! C( z) {( m" MBogoMIPS: 4594.43
' `6 ~0 O% m8 _4 a: |. QVirtualization: VT-x* o7 K) r5 y( R" g# ~, l. ~
L1d cache: 32K
5 |! G) g8 v% vL1i cache: 32K; @: m. C0 a- C. s% X8 s
L2 cache: 256K+ U+ j. i" s# i5 S
L3 cache: 25600K- B, G& u, r) D I
NUMA node0 CPU(s): 0-9,20-29
, x) }5 s. U8 e' J0 }! |NUMA node1 CPU(s): 10-19,30-39; q: ]* p5 J9 a
[root@Master ~]# % X- N: ~4 z/ T" H- a: J, u* C
复制代码
, W. C) o' [( k% {. O1 s% J. ]复制代码$ ?$ H* Q# y3 ]( _; r: B& h
(8)查看cpu运行模式
& T% a8 {' p2 t7 h, a* D. z[root@Master ~]# getconf LONG_BIT
' P H! L/ W5 Z% p640 [4 A, F; s z' Y6 Y+ W
(9)查看cpu是否支持64bit5 P0 a* j4 c" f7 G/ {
[root@Master ~]# cat /proc/cpuinfo | grep flags | grep ' lm ' | wc -l
6 {$ F# }4 q: f- @0 ?40
3 {2 w8 b8 J" F% |(结果大于0, 说明支持64bit计算. lm指long mode, 支持lm则是64bit)
3 \/ q- v" B, a' P' i6 o
: ^+ N& F5 H4 x4 P6 t2 Q6 [: Z! q三、查看内存信息2 X9 O2 T9 C* ^) p
(1)查看内存硬件信息
8 {& f+ v- q+ O复制代码9 U4 J3 r1 _( H9 S1 y" E
复制代码- D) R g G; j- M; [( n8 `
root@Master ~]# dmidecode -t memory | head -45 | tail -24
5 Z2 S8 r. ~, x7 O( VHandle 0x000C, DMI type 17, 40 bytes
1 D, Y. U% m, ~" {$ zMemory Device# _3 L, B% h- E; ^
Array Handle: 0x000A
. ?# g5 I$ c% c" H! C Error Information Handle: Not Provided. T1 M [6 Z( |
Total Width: 72 bits0 H9 S* T9 f4 V$ x- L% t9 K7 b
Data Width: 64 bits
* D- u( A, _0 L- H+ I/ k; y, H Size: 16384 MB4 e2 R; t- x# A' R
Form Factor: DIMM
" B, e$ [7 y( P# c+ R* |0 R Set: None
y" n% E3 J8 L& k6 O+ @, u) U' _ Locator: PROC 1 DIMM 1
4 l7 o' f' H: [1 [ Bank Locator: Not Specified
0 P2 g. ^& R9 ~) O Type: DDR42 B- b. m+ d r, f" {- }
Type Detail: Synchronous Registered (Buffered)! f' I) e$ t+ ~- m; e1 G& E
Speed: 2133 MHz% ?* o- N( A1 E9 k D, W6 U
Manufacturer: HP + k5 {9 ]1 u9 b) g, y; ~- G
Serial Number: Not Specified2 F' a6 D& f* A) M2 H+ E
Asset Tag: Not Specified0 H! z' r1 F$ \' E9 C
Part Number: 752369-0810 _8 c1 }' {& I3 S! q5 d
Rank: 2
' }4 Z5 g+ u% \. X Configured Clock Speed: 2133 MHz9 ?( q' y1 G. B6 z+ [$ C5 X
Minimum Voltage: 1.2 V8 q" s, p+ R( ~! L6 @
Maximum Voltage: 1.2 V1 Q" p8 q! O& Z$ p
Configured Voltage: 1.2 V
4 Z9 ]& c) R+ \+ [4 w( Z+ p3 T复制代码
" z" L/ I* ]" H. ^: G) n复制代码
7 Q9 j* d' W R" B# D3 O- f (2)最大支持多少内存2 L1 G6 h% ?1 B* I' ?
[root@Master ~]# dmidecode|grep -P 'Maximum\s+Capacity'
) c% n5 L- M. P* l5 [& O4 H
- g7 m& _( u# F (3)Linux 查看内存的插槽数,已经使用多少插槽.每条内存多大:
; @! V; N, V4 X8 {* n( ?
% X0 q* o* p9 A7 K+ z4 } (4)Linux 查看内存的频率:
2 j9 l# G7 L4 p) M* E[root@Master ~]# dmidecode|grep -A16 "Memory Device"|grep 'Speed'
4 _3 q; \- `. i( R' d! \1 H3 h& U
+ I0 r* P" Q4 j ~3 Q0 o (5)Linux 查看内存的详细信息:
2 }4 H# x, a8 X/ x( u2 x; V( X复制代码
5 y: t7 ] |/ N复制代码& B9 f0 n8 g* N
[root@Master ~]# cat /proc/meminfo |head -20
( R: ^! B+ c1 E5 v. s( _ IMemTotal: 131897620 kB
9 I0 ^- ^4 Z2 QMemFree: 414124 kB
& p1 F/ ~+ K) s4 @! g/ N5 W& N' TBuffers: 1040560 kB4 s, H# L$ V k# Q2 U2 J( l
Cached: 111083180 kB
& P; J" Y; b9 y% pSwapCached: 1320 kB# J2 E, n& a1 ] B1 A
Active: 7637912 kB
1 `9 |: I ]+ y7 _2 d; E( s' F; @Inactive: 110607108 kB
0 d7 V& O Q+ f) LActive(anon): 4406900 kB1 Z+ Q- K7 h' l5 O1 N
Inactive(anon): 1714900 kB
7 w, G8 U$ C+ ?! [/ |5 ?3 A) R$ cActive(file): 3231012 kB
2 U9 T8 x7 ]. n% D7 O$ GInactive(file): 108892208 kB
; v; [, K5 @9 _, l6 }. zUnevictable: 10878976 kB p0 y5 J4 K8 S1 Q q+ T
Mlocked: 5521652 kB6 }8 M1 h1 @+ q0 N9 [
SwapTotal: 16777212 kB
! g5 r8 Z" O: a/ i9 cSwapFree: 16737536 kB" B$ r2 F$ ]2 T/ ^" ^& [0 g
Dirty: 180 kB
: H9 u+ S& g |" q% ~4 KWriteback: 0 kB
' z$ j- [* {) N2 h$ R3 r+ H4 qAnonPages: 16999324 kB: Q2 Z' _$ w, s
Mapped: 149020 kB
+ R9 ?% x5 o+ @9 o2 g a& tShmem: 172 kB4 K+ _6 r: m( ~2 D1 d
复制代码
* `* z& g3 u) ?" ^复制代码8 S/ P$ X8 t! ]3 H
(6)Linux 查看内存的使用情况6 ~0 C" ?9 P, @1 c4 S$ v/ }4 m, l( H
[root@Master ~]# free -m // -b,-k,-m,-g show output in bytes, KB, MB, or GB
5 v0 Q$ D8 x9 {2 D( e" a2 [, q total used free shared buffers cached
6 z7 C+ Z& F# J3 uMem: 128806 123407 5398 0 1015 1034741 h4 K; T# I5 L1 q+ Z$ D/ c
-/+ buffers/cache: 18918 1098883 e0 Z# q0 t j1 }- j1 Q7 x
Swap: 16383 38 16345
: ?- {/ T# V# V- I7 ^4 a
( X. u& B' J ?/ D5 d$ X# | 四、查看硬盘信息) }9 s0 T l( f
(1)查看挂接的分区状态
, y0 O7 j; m( a" ^$ B( _5 I2 n[root@Master ~]# fdisk -l |grep Disk) x& P( s6 l* w* }
- r. @8 Q3 b) @$ s y0 c. D' @6 Q$ Z(2)查看硬盘和分区分布
# [2 N$ C3 r5 s# B# n* E* ^复制代码$ F8 D$ A# H! U2 i
复制代码
; b3 G( A$ m$ d1 F7 f0 V[root@Master ~]# lsblk5 g3 n" r- `' |. U% Q$ w
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT/ P4 @# I& k0 x! U# A8 b& t
sda 8:0 0 279.4G 0 disk
3 d! ]( m9 z& a+ D& i├─sda1 8:1 0 50M 0 part /boot: C9 V0 L: g! x- T$ y
├─sda2 8:2 0 100G 0 part /
% _; c( C) B) {├─sda3 8:3 0 50G 0 part /home! I; r8 D. I' t, ?
├─sda4 8:4 0 1K 0 part 3 g1 O: u# V" F; B$ ~7 Q" l% w
├─sda5 8:5 0 16G 0 part [SWAP] X1 m) j7 @: F: \
├─sda6 8:6 0 13.3G 0 part /tmp7 [ _7 Y, T& N3 t m/ c8 _
└─sda7 8:7 0 100G 0 part /usr
9 v9 q8 W a5 Y; usdb 8:16 0 83.7T 0 disk 6 s3 Z/ A( m U8 l
└─sdb1 8:17 0 83.7T 0 part /PureDisk
" z9 _; H1 d' ?0 |" H1 r0 c b" l复制代码
* x* l( z/ J# E. N' v7 H复制代码
' i9 V2 ~4 ^1 }) a+ L) S0 _ (3)查看硬盘和分区的详细信息
( C7 R7 a- R( t- W复制代码# `9 `$ h9 A0 h
复制代码3 v3 f) f6 }' ~+ m+ c7 z
[root@Master ~]# fdisk -l
3 Z7 J) P0 V$ W1 m8 c qDisk /dev/sda: 300.0 GB, 299966445568 bytes$ B4 c% D; E7 V9 V9 y6 n& G5 S7 J
255 heads, 63 sectors/track, 36468 cylinders. B2 s" N/ c! {+ f4 \; y
Units = cylinders of 16065 * 512 = 8225280 bytes
( G! n0 K) X: f- b3 m8 ESector size (logical/physical): 512 bytes / 512 bytes
4 `! D7 f8 s+ B* gI/O size (minimum/optimal): 262144 bytes / 262144 bytes
) v, K1 S$ v% t% w/ jDisk identifier: 0x000384d9
0 s: ^8 S; H/ V2 S5 g Device Boot Start End Blocks Id System* ~- ^) f4 E d$ G. w+ P) j" X' _
/dev/sda1 * 1 7 51200 83 Linux
9 Y& n/ J8 H* P1 SPartition 1 does not end on cylinder boundary.
i) q! s2 u1 A) q7 u, ~9 B0 R/dev/sda2 7 13061 104857600 83 Linux0 k3 O- z+ Q* v# p U
/dev/sda3 13061 19588 52428800 83 Linux" a3 y: @, ~# ^9 H+ V. }
/dev/sda4 19588 36469 135597056 5 Extended3 ^2 m; ~, g/ E% V
/dev/sda5 19588 21677 16777216 82 Linux swap / Solaris' C* X. _/ b0 [
/dev/sda6 21677 23415 13962240 83 Linux
3 D% N. x8 M* ^. X/dev/sda7 23416 36469 104854528 83 Linux
$ {$ J: X! C& d. M; {) ?WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.
/ y+ S& \* U* N0 `& x8 f, T$ u+ x/ I+ d
Disk /dev/sdb: 92017.3 GB, 92017310654464 bytes
. g7 o# A8 h' Q6 \255 heads, 63 sectors/track, 11187134 cylinders
( G9 s" a% ^* w2 fUnits = cylinders of 16065 * 512 = 8225280 bytes1 U, }+ G' Z8 Q+ b- k# S& _
Sector size (logical/physical): 512 bytes / 512 bytes
8 M- P* x- J6 J+ uI/O size (minimum/optimal): 262144 bytes / 6029312 bytes, y/ I! A6 R' m3 j7 X9 I( b
Disk identifier: 0x00000000
0 ]$ ?6 _: D2 E+ h& x% ?! k1 V Device Boot Start End Blocks Id System7 I; I" u# v: x/ _
/dev/sdb1 1 267350 2147483647+ ee GPT' v3 u. | d+ o; T- G [5 L
Partition 1 does not start on physical sector boundary.2 }& K1 W3 Q- j# t2 W1 Y. D! k
复制代码% |' q) V- f1 {2 }, U
复制代码" Q* [, _8 N1 `( u% Y
(4)查看挂接的分区状态
4 J- \( |2 ~; \2 g" C$ L复制代码
[- E4 M' _, V复制代码
' B! W9 a: `( b* g h# c, @/ f[root@Master ~]# mount | column -t# Y# I" T Q& c
/dev/sda2 on / type ext4 (rw)& g2 C8 t: i3 D+ v5 z. A
proc on /proc type proc (rw)7 F# c" z0 H5 d2 V
sysfs on /sys type sysfs (rw)
( {5 M6 T8 _& b2 Ydevpts on /dev/pts type devpts (rw,gid=5,mode=620)( j. o! N" H0 c. w* W
tmpfs on /dev/shm type tmpfs (rw) U8 Q7 \4 k1 k" K% [! o
/dev/sda1 on /boot type ext4 (rw): b7 X/ ?* s, V
/dev/sda3 on /home type ext4 (rw)* a1 U. U0 G9 F; g% N
/dev/sda6 on /tmp type ext4 (rw)
9 f! N k5 Z4 t/dev/sda7 on /usr type ext4 (rw). I' e! B& i9 O( @8 h. t2 u
/dev/sdb1 on /PureDisk type ext4 (rw)* S A9 { I6 \; f% S' o/ p
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw
# R x9 Z& p+ E2 |: Q5 o- D C. h( R复制代码
( k4 B. B9 N- e2 k复制代码& Q; z5 a( Q/ N" }8 q$ I a
(5)查看挂接的分区状态( `- q) m% g3 H0 Y8 x5 S3 {
[root@Master ~]# swapon -s 7 Y( K5 h) l3 t k0 g% [2 M4 u
Filename Type Size Used Priority0 j$ I; M' U# G5 A% P
/dev/sda5 partition 16777212 39676 -14 \- n: u2 M. L |$ v. f3 |5 S
(6)查看硬盘使用情况0 j$ S! N1 o2 r+ P% c
复制代码
( o' @. G# i: o1 h复制代码, I( F3 M" ^9 ^0 c
[root@Master ~]# df -hT
4 E4 e4 E1 u, w: g% y0 a* iFilesystem Type Size Used Avail Use% Mounted on
+ t8 J' J4 V: g( ^) r, S# z5 a/dev/sda2 ext4 99G 561M 93G 1% /, ?1 U+ @& e) P$ K! ] E
tmpfs tmpfs 63G 76K 63G 1% /dev/shm" R6 b9 k' w6 S9 P* ]+ Z
/dev/sda1 ext4 45M 38M 4.9M 89% /boot
- m# u) L! Y% G* n. z* e* o/dev/sda3 ext4 50G 52M 47G 1% /home8 G- ]" B7 `2 [5 m. Q( s0 J
/dev/sda6 ext4 13G 34M 13G 1% /tmp k0 k8 J6 i3 M: `* y
/dev/sda7 ext4 99G 21G 73G 23% /usr% @3 p0 `, c1 _/ r- ^
/dev/sdb1 ext4 84T 41T 40T 51% /PureDisk
: G. V* M7 }+ M" X$ G复制代码" k! L% Q% S% h* @ j9 H7 m7 T
复制代码
; Q- k- y/ U/ F' w (7) 硬盘检测命令smartctl* D; s4 i4 X* N2 `1 }8 B; ?# S: u
复制代码
8 R% g: `; }; e F( y+ H. r复制代码; ^1 h% Z- L4 H& m; U
[root@Master ~]# smartctl -a /dev/sda
; @* }: ~0 g9 Esmartctl 5.43 2012-06-30 r3573 [x86_64-linux-2.6.32-642.el6.x86_64] (local build)
S8 G+ F: Z. k. X1 _; gCopyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net
9 e1 R5 I; S+ w- t6 ^Vendor: HP 8 e; P# B" f# l. n) Q0 r
Product: LOGICAL VOLUME
% h& _+ f1 P- z* w- ]Revision: 3.56
/ t/ _2 ~& j" p' A( k+ ?6 fUser Capacity: 299,966,445,568 bytes [299 GB]
2 i7 ]; U+ X1 z6 p$ b3 rLogical block size: 512 bytes0 o: J/ V- m) x' x7 B8 S1 \. R
Logical Unit id: 0x600508b1001cc8a1b9ec4dacc5ab35dc( E! N3 X: _5 f a( {4 Q
Serial number: PDNNK0BRH9U0AG : V' O l( l" i3 }" y3 w2 r
Device type: disk
. l7 X* k- {+ a B/ c* ?# aLocal Time is: Mon Feb 5 13:13:33 2018 CST
' A4 `( i; ~" v0 JDevice supports SMART and is Enabled g* N D4 V. n9 Z/ ` B. e
Temperature Warning Disabled or Not Supported4 _- R' n' ?2 H4 D9 W) J1 p* B% w3 L5 q
SMART Health Status: OK: l Y2 t# Q1 e& A3 z& T7 H
Error Counter logging not supported- [/ q8 B0 K. l
Device does not support Self Test logging
/ ?) s4 J3 L* U) E6 r复制代码
* O$ j" h! {) i6 u复制代码
% d! D( V2 d) z/ b( r
2 T) g/ k3 F& ~- _+ l五、查看网卡信息
7 W; N( H" C$ s' _; x(1)查看网卡硬件信息 h# r1 i" ^$ U: t
[root@Master ~]# lspci | grep -i 'eth'' l) V$ Y' m, H$ E- F
k% Q3 O1 i8 X. T' |* c (2)查看系统的所有网络接口& X( w0 R5 @4 \: A8 u/ l
[root@Master ~]# ifconfig -a. D+ k! b6 v) ]/ H2 U( G$ A( W
[root@Master ~]# ip link show
; J+ b! E4 s, I" q (3)查看某个网络接口的详细信息,例如eth0的详细参数和指标. M: M5 x! W7 x3 f3 y
复制代码5 {6 M2 _, U7 k$ P2 ]
复制代码& w! }" X3 ~6 c. g
[root@Master ~]# ethtool eth0
7 } P* S! A- a- g; KSettings for eth0:9 y7 i2 T' t9 g
Supported ports: [ FIBRE ]0 V8 I" z0 r* b, `7 q
Supported link modes: 10000baseT/Full + D5 z; g% O; s5 }3 B1 U' }
Supported pause frame use: No
% \7 I( k7 Y8 G& ]7 }) q Supports auto-negotiation: No4 D5 I" M! }& d# {) b
Advertised link modes: 10000baseT/Full
; \! h5 S3 l3 [% J8 D3 b Advertised pause frame use: No7 a* j9 Y! y9 W" e
Advertised auto-negotiation: No% T0 h; a7 s" M. k
Speed: 10000Mb/s; b X0 t) Z2 i% S$ [" ^
Duplex: Full! X# }! D( e/ x+ k$ |3 `8 D+ w2 `- ~
Port: FIBRE" i7 w8 {7 g9 j$ ]) V
PHYAD: 06 I# ^+ l1 t: T, \8 e- k# _7 s
Transceiver: external
$ v1 ^) l: e t$ c! e; ? Auto-negotiation: off
* H' ^- _/ A4 z) B4 e! k/ I Supports Wake-on: d
9 Y- b' ~0 ~! @- D! s" | Wake-on: d; }* b: }+ L- X d
Current message level: 0x00000007 (7)
$ S4 |2 Q+ X% G* { drv probe link S; I% d% Q/ x
Link detected: yes
# G, e5 M- X, B( p( z复制代码
- o* X6 g C0 A3 U7 N0 \, W# I复制代码% m0 |$ n3 b; d ~4 y" F
(4)查看所有网卡的链路状态; N! s. B3 K: U
复制代码; C) o- j# _. B. }/ p& e
复制代码
- x$ W+ k# o- m[root@Master ~]# for i in `seq 0 9`;do ethtool eth${i} | egrep 'eth|Link';done
0 _( }$ J$ o% G8 @3 ?6 z3 `Settings for eth0:
8 y! k% m9 P, T: L& ~ Link detected: yes ' ?) N9 y" l% ]+ q$ b) k" ^6 C( Q
Settings for eth1:# `( z8 y$ o; [, I1 x+ O% S
Link detected: yes
4 Z9 S" }3 k/ n$ N/ B( [Settings for eth2:0 v% w1 V0 d. }# ^" x6 Y
Link detected: no, t8 U" x) V9 f- R- h6 v
Settings for eth3:! s# @; Q$ b! c' u" D9 J, e
Link detected: no
& C! w V; d; w9 B! ?Settings for eth4:
0 J! ?5 B$ ]0 ?" a Link detected: no* q: Y# T P8 p
Settings for eth5:" C- O2 s" M/ m! a
Link detected: no
! s% Q6 n, L- G) d! x/ n' A# HSettings for eth6:
6 \- x) p2 B- W$ W) F0 u Link detected: no
9 D9 }$ K1 p5 }" k/ t# G5 N1 FSettings for eth7:
" Y1 b7 F% l8 r2 B0 D Link detected: no
t' R7 Z: A$ u3 RSettings for eth8:
; r8 @$ ?' g# d Link detected: no% S% k7 r" v |- n/ R: k
Settings for eth9:
2 t/ X0 K# m8 }* B5 V+ Y% P4 D Link detected: no
; m& T" x4 r5 ^复制代码# F% x8 G, p4 T$ ~8 Q$ B o0 _
复制代码0 e/ t5 p# b; i# b
. L3 u. I' F1 s 六、列出所有PCI设备信息
4 k3 J: c& a/ f复制代码
! Q4 o }+ `' Y0 b% V/ A b0 t复制代码
/ V! C( \- f6 ]! c1 h[root@Master ~]# lspci -tv | more
! u9 @2 T- M& \: R- p-+-[0000:ff]-+-08.0 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 QPI Link 0
" x! H# Y! c$ H | +-08.3 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 QPI Link 0( F9 ^2 Y: ?+ ~
| +-09.0 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 QPI Link 1$ Z$ w! R q) X
| +-09.3 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 QPI Link 1, O7 V8 ], ]9 l0 n$ y
| +-0b.0 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 R3 QPI Link 0 & 1 Monitoring' t# S0 W" Q" A4 ~/ Z1 V! f
| +-0b.1 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 R3 QPI Link 0 & 1 Monitoring
" O6 u- O; P1 d | +-0b.2 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 R3 QPI Link 0 & 1 Monitoring0 N; E$ D9 y! U% ?) w. ]" a' T6 ~9 Q
| +-0c.0 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers
6 H4 t8 ^2 q. u& b9 Q( G | +-0c.1 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers# n% r- }8 ~+ v5 L
| +-0c.2 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers
I! T$ ^7 ]- `; U | +-0c.3 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers" V9 r8 M: ^& F" F; M) ~$ L& n3 b; _
| +-0c.4 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers
+ i6 v% `$ |( d2 t9 Z | +-0c.5 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers
- L% X5 d; J+ ]0 v+ | | +-0c.6 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers& t4 b4 }0 o! |5 n8 ?/ O
| +-0c.7 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers' h# q7 m2 ]5 F, z$ G
| +-0d.0 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers- ?: ]+ f9 {1 w( Z# D
| +-0d.1 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers9 D# S7 m4 ~- a- K6 `" g
| +-0f.0 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Buffered Ring Agent3 m5 j, p' I2 W6 D6 Q
| +-0f.1 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Buffered Ring Agent
1 y+ _2 Z$ K& G* h" U | +-0f.2 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Buffered Ring Agent
9 ?( X, C) C9 o* i | +-0f.3 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Buffered Ring Agent
3 g2 p- o$ @6 U& L; x2 a8 P& \3 j复制代码
3 I' d+ |6 J, C- f% w
3 O7 z, R! g ]$ J3 n( M+ U, R复制代码9 O) K2 D+ S& ]2 Q
+ `, Y8 ]/ O+ Y4 k; `& O5 Uend
+ P3 X5 |8 ^2 M$ G' MCentOS 8 U盘安装及Installation Source报错和ssh报错的解决方法1 z# e. q0 h3 M1 v$ d; N& R' p
|
|