|
|
sosreport命令linux系统收集系统信息+ [ B$ l- i+ I9 P4 R' | @/ {
[root@localhost os]# sosreport --help
, { d i. i4 eusage: sosreport [options]% s3 R0 W+ Q I; M! h: P% H
Some examples:
' B4 h* T8 y" ]+ Wenable dlm plugin only and collect dlm lockdumps:' R& E) v3 e# _
# sosreport -o dlm -k dlm.lockdump
) C l$ N8 h" X! r2 U+ Ddisable memory and samba plugins, turn off rpm -Va collection:
$ b# ]3 {4 b' |' W # sosreport -n memory,samba -k rpm.rpmva=off2 m) E$ q( U5 T/ A% k5 j2 }
optional arguments:
) x* Y$ ~9 [& g0 \ -h, --help show this help message and exit
$ j6 x8 f1 ~2 S -a, --alloptions enable all options for loaded plugins
. a% A# c( r- s2 d$ X& J' K --all-logs collect all available logs regardless of size+ H2 ^5 C3 W% G I2 f! S# r
--batch batch mode - do not prompt interactively {! k7 N9 x$ L# e( Z3 \0 s- ~
--build preserve the temporary directory and do not package5 P a% o4 ]# w+ ]) _/ P. c
results! \/ J6 t, e2 X8 v
--case-id CASE_ID specify case identifier& s% V7 H4 X* \* R4 H
-c CHROOT, --chroot CHROOT
: D* n+ i! G3 N$ x# V0 ? chroot executed commands to SYSROOT [auto, always,
/ S- k" E) [ ^7 G! z4 J6 g never] (default=auto)
9 Y8 E6 K, m- c3 Z/ { ^, D --config-file CONFIG_FILE
+ y5 u/ ^7 q$ j1 M1 m: Z3 k specify alternate configuration file2 P5 R4 R# ~8 J5 t
--debug enable interactive debugging using the python debugger! b6 ~0 e' j: ?, w" S5 G; x0 M& u3 ^2 x
--desc DESC, --description DESC
' H( H! {9 a$ E1 [ d Description for a new preset
7 p8 Q2 Y5 n4 p2 J) ], P --experimental enable experimental plugins1 B( g p1 k3 V
-e ENABLEPLUGINS, --enable-plugins ENABLEPLUGINS: u+ u p9 l2 q1 w# B& f- W
enable these plugins
8 l9 p; C& Y9 k( P4 Y -k PLUGOPTS, --plugin-option PLUGOPTS
, Y- d: {7 W( N N8 a/ E/ s! ] plugin options in plugname.option=value format (see1 r1 N3 y6 T$ U# z) h8 u% M% x
-l)
# S- S3 \- a9 i$ X --label LABEL, --name LABEL4 D. F3 q! K: c- T# w
specify an additional report label* n* X0 i3 O& \& z
-l, --list-plugins list plugins and available plugin options* f8 d7 Y- u* @( w! c2 g9 q; D1 y
--list-presets display a list of available presets2 Q7 d% s3 m% U8 G
--list-profiles display a list of available profiles and plugins that
# _. f I% K/ c. Q" [, k/ k they include
+ z1 W8 o/ ]5 A9 a$ R& q) v. w* g4 l --log-size LOG_SIZE limit the size of collected logs (in MiB)
, k. @5 q1 ?' g1 R* y8 H -n NOPLUGINS, --skip-plugins NOPLUGINS
/ o8 e0 u; A/ C$ v5 L0 a disable these plugins
( M8 H1 T1 u4 @3 L --no-report disable HTML/XML reporting( `. _4 O# ^( p+ `- T" _% S
--note NOTE Behaviour notes for new preset5 Y P( c }8 `4 x
-o ONLYPLUGINS, --only-plugins ONLYPLUGINS' W Z( |# q T( I8 i& \5 k: r8 k
enable these plugins only% N! C4 q5 T9 T* |
--preset PRESET A preset identifier' n% m1 Q" {. i' q
-p PROFILES, --profile PROFILES( j, J( U9 i2 R; X# C
enable plugins used by the given profiles9 g; c5 ^5 y* u, T0 F: i% F9 u$ V% c
--quiet only print fatal errors- W1 _, r$ E% T9 S+ n0 l
-s SYSROOT, --sysroot SYSROOT
+ c Q% G, y& I system root directory path (default='/')
$ Q9 C( P$ A/ r' p3 S. m --ticket-number CASE_ID! m6 r) N V" N8 {' r
specify ticket number
" _# _6 B# j- E$ z0 Q& }& B+ \ --tmp-dir TMP_DIR specify alternate temporary directory& K# ~3 p. ~. p3 K& j ?4 J
-v, --verbose increase verbosity: M7 g3 ]2 ~3 I- \! B; Q
--verify perform data verification during collection1 }8 n$ q/ t! a8 A8 q
-z COMPRESSION_TYPE, --compression-type COMPRESSION_TYPE
: {8 w: \+ u: h5 w4 _2 V4 Y compression technology to use [auto, gzip, bzip2, xz]
/ _; l0 }, B, i" M6 d (default=auto)
! j6 x) I; N2 M$ O" ] -t THREADS, --threads THREADS
) _& f: D/ N( _! \ specify number of concurrent plugins to run8 E& r* }9 H w- _7 {, g2 M. |1 X
(default=4)
/ v7 J! Q) o ~% l+ u --add-preset ADD_PRESET
. \; Z+ D, k% I: @& j5 i Add a new named command line preset
- m- k* e7 Q ^* s# S' } --del-preset DEL_PRESET
0 W2 |6 G9 h, o) U& i/ o Delete the named command line preset4 C1 K8 G7 w: s
--encrypt-key ENCRYPT_KEY' ^1 O( e8 X; Z+ v6 K; @% q
Encrypt the final archive using a GPG key-pair D! S! B+ d; q1 ]& q. ]4 H
--encrypt-pass ENCRYPT_PASS
6 d) \0 d6 J% b Encrypt the final archive using a password" f `& C8 V h. x
+ g" w4 p- n( M% H
_/ x5 }: E; H9 |# c _0 \
[root@localhost ~]# sosreport -a
8 E* u- u4 g0 v& }$ x/ Jsosreport (version 3.6)
7 q) ~: p) x: I' E3 K8 x PThis command will collect diagnostic and configuration information from) O; L9 F& x; L+ c4 }) H0 B: ]
this Red Hat Enterprise Linux system and installed applications.
7 P) x1 [$ i6 \( P: O1 Y* M _An archive containing the collected information will be generated in
6 l+ u: R V: @% w6 M/var/tmp/sos.TZJHtD and may be provided to a Red Hat support2 U, J( L& W5 t1 b
representative.
4 u1 u; _, B/ s3 D6 fAny information provided to Red Hat will be treated in accordance with
# z- Z _4 H. @" U# _the published support policies at:
! ?' [% _) m+ Z6 j+ s https://access.redhat.com/support// w- n! ~ v- C+ ]. `
The generated archive may contain data considered sensitive and its
" X& |4 E/ I P1 lcontent should be reviewed by the originating organization before being, `. z. U; k: S& }6 r$ k% f
passed to any third party.9 y+ ^. i! K" A
No changes will be made to system configuration.4 S8 Z- |, b0 b3 G; ^/ Q
Press ENTER to continue, or CTRL-C to quit.
0 J. K/ `: f# D. E( R6 O% K" QPlease enter the case id that you are generating this report for []:
$ K0 L. j9 K- M& H Setting up archive ...( P$ k" f8 I0 z/ ]2 O
Setting up plugins ...1 M. i4 n( F6 P( j! p
5 ]! q7 u2 i! lRunning plugins. Please wait ...
! K$ `7 j5 R! ]' E Starting 90/106 systemd [Running: postfix rpm selinux systemd] - k% i# h1 \+ N5 c( X" p
! N C/ R. { @
8 D, P9 t7 J D J9 C% x
Your sosreport has been generated and saved in:
* v* m; B! p% Q- _, } /var/tmp/sosreport-localhost-2021-11-15-wihnsdi.tar.xz+ s# d" J1 b' r$ j* t
The checksum is: 7327254563dc3bd72626772f4754a0f6& f2 N4 x* b$ V2 f1 M4 b N
Please send this file to your support representative.
; @9 A8 G9 u1 X
8 ^, _7 @2 M' R+ I; P
: j% M9 A! T' S# f( C7 P1 D9 \+ \5 e" u* g% O2 s. Q4 V
3 e' i5 g( q- R' N1 O0 `# d
: s# ?6 e3 J" n( A* L. X
2 `6 M# V, [$ n) Q: F
9 Z1 C$ S, ~) i |
[root@localhost ~]# cat /etc/sos.conf) U: g* J: S; v8 H0 S+ \
[plugins]
5 U9 I/ F$ [" j) t0 w0 `#disable = rpm, selinux, dovecot
* j( ^# U- x1 p5 B& O. x* D[tunables]6 U. d, @# D+ t& t% N! g4 o
#rpm.rpmva = off( l- Q# Y3 G: l0 |: J t" q6 N
#general.syslogsize = 15" f& s8 u7 H: o
6 K" d6 p2 X5 b! e
. ~. G' ~ C. C; Y. X) _+ ~' i
|
|