|
|
sosreport命令linux系统收集系统信息: R1 m; z% ?% x; p6 b
[root@localhost os]# sosreport --help! y/ ^7 p6 f0 q/ B- q
usage: sosreport [options], A4 M7 K% l; z) }
Some examples:
6 B y! n: ] r0 N9 v0 ]enable dlm plugin only and collect dlm lockdumps:
1 u/ U. M- ^( e # sosreport -o dlm -k dlm.lockdump0 T% K, z. D w9 `. g0 q+ J
disable memory and samba plugins, turn off rpm -Va collection:/ d9 u! E& r: H* G
# sosreport -n memory,samba -k rpm.rpmva=off$ T& p% _7 L' z, z) m
optional arguments:
u( s' Z; R. G4 [) @9 E w -h, --help show this help message and exit
6 O/ e0 ^! Q7 G -a, --alloptions enable all options for loaded plugins
+ P) d6 p8 r9 F, @: u# N" ] V --all-logs collect all available logs regardless of size
) C1 V& g) b) d --batch batch mode - do not prompt interactively" J9 [" C3 h9 R/ ~. B
--build preserve the temporary directory and do not package9 x3 {+ B; Z8 |. k+ n* C' k
results( Q# T9 O8 A/ Q( W
--case-id CASE_ID specify case identifier7 b& Q4 h2 k: n" N* Q% A3 w' |2 Y
-c CHROOT, --chroot CHROOT# a7 X1 N. c0 Y/ J! g5 w# ^- P9 m5 C
chroot executed commands to SYSROOT [auto, always,
& U, A/ q$ `0 J) u never] (default=auto)1 ^+ z5 Z! d D U$ X$ F/ W7 I
--config-file CONFIG_FILE
/ _9 [2 b0 A( ~6 e, K+ d specify alternate configuration file2 Z* Z: F& b7 m8 u1 J" C4 ]/ I5 Z
--debug enable interactive debugging using the python debugger
6 K, m, G' |4 d$ _$ g --desc DESC, --description DESC
, d3 m, p1 V3 e/ I Description for a new preset
a; v. N3 D3 S$ f --experimental enable experimental plugins
# Y' f+ O5 r6 d1 I -e ENABLEPLUGINS, --enable-plugins ENABLEPLUGINS# Q) [! L5 d. P1 v3 M: j: `
enable these plugins, a6 |& D2 g8 e
-k PLUGOPTS, --plugin-option PLUGOPTS, x) m% h" b# {* u- _, K3 C
plugin options in plugname.option=value format (see' l2 @2 I6 L3 J2 @" R9 T
-l)
2 [5 s% _. }! n, Y0 q1 G- v --label LABEL, --name LABEL% o+ _3 n' n9 v% u j
specify an additional report label
: ?+ L$ [+ R+ w9 d$ a9 ?, C -l, --list-plugins list plugins and available plugin options
& k# M7 `9 r7 j; p4 O6 E/ G9 B --list-presets display a list of available presets7 g, t- G' T( q0 F5 _
--list-profiles display a list of available profiles and plugins that
+ |: H7 Q Y8 u9 j/ w4 U5 _ they include
/ A- m7 [, y3 s! ?" z2 D# Y5 y8 z! o --log-size LOG_SIZE limit the size of collected logs (in MiB)
0 d. k' [) q& R3 m1 @ -n NOPLUGINS, --skip-plugins NOPLUGINS7 q3 N; Y6 N4 V- @0 E6 u
disable these plugins* y: I; x1 K1 {% F d
--no-report disable HTML/XML reporting$ R3 D- o. B% s! e! m7 H
--note NOTE Behaviour notes for new preset
# Q! b! h/ p2 K7 |+ S# t -o ONLYPLUGINS, --only-plugins ONLYPLUGINS
! C$ w, |5 K8 \$ d: a0 L l enable these plugins only
' o7 V. T6 T2 Z --preset PRESET A preset identifier
" X. ~* q6 T1 Y- ? -p PROFILES, --profile PROFILES
( ^- D' u/ Z7 D& _0 m) e6 b enable plugins used by the given profiles0 x J# d% m: H* I
--quiet only print fatal errors/ ^, c3 b1 G* j& x' D
-s SYSROOT, --sysroot SYSROOT8 G( _4 \3 e) G, x5 s' O
system root directory path (default='/')8 }5 I% N& ]$ g
--ticket-number CASE_ID+ h( G; l% {' B" h0 x1 W' l3 j" R
specify ticket number
& @6 }) K6 X9 t0 K --tmp-dir TMP_DIR specify alternate temporary directory
& P" D/ C3 O, G% \/ D3 y; [% @ -v, --verbose increase verbosity
# ]* }% g1 @; O3 m* A/ j --verify perform data verification during collection
; X& ^1 F0 b' l$ w -z COMPRESSION_TYPE, --compression-type COMPRESSION_TYPE, e: {9 |6 v e# O( I& R( q% ?
compression technology to use [auto, gzip, bzip2, xz]+ N! ^% _8 a- K3 V0 }9 h' i+ K( S9 v
(default=auto)
" J4 H Y6 W: |( | -t THREADS, --threads THREADS6 X+ F$ [& W; S5 K7 o8 a
specify number of concurrent plugins to run
) Q f. L5 n* e- m5 l$ [0 u8 l (default=4)
& J3 Z4 P+ }- ~& [& R --add-preset ADD_PRESET
$ }6 M4 b4 z# b Add a new named command line preset
. @- Y6 |% P$ v& V --del-preset DEL_PRESET5 H$ ?+ I2 u; D8 P' v
Delete the named command line preset
: E9 @" q" @# _* C4 s --encrypt-key ENCRYPT_KEY
* W( ^& b) p3 j& q t5 @: J/ \ Encrypt the final archive using a GPG key-pair
[) x4 |- ~. t! r3 b --encrypt-pass ENCRYPT_PASS
5 a& l2 g2 v/ E# X/ A Encrypt the final archive using a password a, l# `7 V' u Y! e
" H+ d# E& B8 S/ j W
( f% {) k$ J) I0 Z# r# O9 w
[root@localhost ~]# sosreport -a ! m1 f( G9 b6 S$ _
sosreport (version 3.6)
' ?/ \; S6 [: O" X/ |This command will collect diagnostic and configuration information from
3 m3 R( a/ o3 g& ithis Red Hat Enterprise Linux system and installed applications.
" o; |/ p0 e. l( G' K* hAn archive containing the collected information will be generated in
# l5 F3 ~8 @9 o$ P8 }/var/tmp/sos.TZJHtD and may be provided to a Red Hat support
1 s8 ^. G/ z) h2 \representative.; z1 M' @' I8 w0 b# |0 }# P
Any information provided to Red Hat will be treated in accordance with
& k% R U5 K* S' \; C" othe published support policies at:
0 a- x6 O" ]2 X( f) v https://access.redhat.com/support/
2 }$ ~ g- s Q8 c, L& mThe generated archive may contain data considered sensitive and its) h: O G# S# T. I
content should be reviewed by the originating organization before being# C. u" X: D, v9 R- @
passed to any third party./ b( L3 N$ \) a8 O% T, m* J
No changes will be made to system configuration.
9 j; |; H% u1 i7 _/ s6 N3 k4 j. \Press ENTER to continue, or CTRL-C to quit./ G: f* Z1 v: g$ v$ _5 H( |8 f, E
Please enter the case id that you are generating this report for []: 0 D( ?4 u6 Y- p! g i4 f
Setting up archive ...$ v6 Q- ]8 Z1 T% L! _" `
Setting up plugins .... z: o! z. ^- U! j
P8 c9 P. t6 e" h0 J2 s( kRunning plugins. Please wait ..." ]" ^" t, V6 c3 i, S C; _
Starting 90/106 systemd [Running: postfix rpm selinux systemd]
& x1 ~) ~( i/ A8 m
% M/ C x& [) j! \4 U$ B& Y
5 Q! i8 C$ E; B3 vYour sosreport has been generated and saved in:. B$ }1 @9 c/ E V& S8 h" D
/var/tmp/sosreport-localhost-2021-11-15-wihnsdi.tar.xz+ S! ~7 r Y: Z+ d$ Y( a/ ~
The checksum is: 7327254563dc3bd72626772f4754a0f6
! i% G$ A0 ?; t: V3 P) H1 K1 YPlease send this file to your support representative.
& Z: e2 `3 x0 Y7 O
! c. o* K0 ~: f1 T. v
' {% M5 x' X% ]+ t
, r- C, p! }# j$ u
+ Q5 I/ C9 c6 d- @ \
8 @- a( u i& Z' E' Q; V6 p6 G8 j) K. q8 f4 R6 h% G8 l3 A- I
3 W1 ?7 |# `5 V* T% O5 K9 R `[root@localhost ~]# cat /etc/sos.conf) A) N8 u" N j* d7 p. v& R
[plugins]6 O6 F+ a) k' w3 _; R. [9 o8 S
#disable = rpm, selinux, dovecot
. a; i. x+ e3 w# i o* A! p& y[tunables]
8 S% G) b+ ^( m0 U0 B# [' i#rpm.rpmva = off s; V2 Y" W% c8 m( e9 u
#general.syslogsize = 15- }% F# t* R; B, e5 d
6 {8 c( L# [) B
# }* f, P! X/ x' n+ R
|
|