找回密码
 注册
查看: 1326|回复: 0

sosreport命令linux系统收集系统信息

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2021-11-15 10:50:32 | 显示全部楼层 |阅读模式
sosreport命令linux系统收集系统信息
/ ?5 o0 b( h: u4 W[root@localhost os]# sosreport --help
- `3 s& [. Y9 g5 e. @2 ^usage: sosreport [options]; m& ?, m' d( K; p
Some examples:
3 `# x2 H2 P2 z* _; c' U, Henable dlm plugin only and collect dlm lockdumps:: @( l7 @( ~; S2 `: I
  # sosreport -o dlm -k dlm.lockdump
; ^1 a5 e# _/ p9 _& [+ S8 A# Edisable memory and samba plugins, turn off rpm -Va collection:2 V( P7 |4 X+ z& x$ e
  # sosreport -n memory,samba -k rpm.rpmva=off
) E7 H  I0 }: d" u7 l) F1 J* noptional arguments:! D* f6 E' k. \0 h- h1 G
  -h, --help            show this help message and exit
# W4 _' H1 I8 a7 r+ w5 x" q. A' R  W' c  -a, --alloptions      enable all options for loaded plugins7 h7 ]) l4 F+ d; E0 F# }
  --all-logs            collect all available logs regardless of size/ q6 g0 z  ^# B0 g9 c: L; e1 _
  --batch               batch mode - do not prompt interactively9 m; m# `8 Z8 J4 h
  --build               preserve the temporary directory and do not package/ A8 U' B! o6 ~) h% u
                        results
5 \9 w0 u- [7 t; J8 z  --case-id CASE_ID     specify case identifier
2 Y7 c# }6 r/ c; @  y& o4 [& d9 S  -c CHROOT, --chroot CHROOT/ k, l# M& \) V" M# N8 l8 `
                        chroot executed commands to SYSROOT [auto, always,
& u( Q2 z7 @$ p1 C/ b- S$ z                        never] (default=auto)
) G2 B, k$ M% U' h7 V  --config-file CONFIG_FILE! o& F5 x/ b3 Q# B
                        specify alternate configuration file0 W! K+ h' Y4 O
  --debug               enable interactive debugging using the python debugger
: T" o) C. {7 ]4 _, \# y! B- a  --desc DESC, --description DESC- l. R! K; K8 n
                        Description for a new preset9 g- q0 g. D+ z" h" V
  --experimental        enable experimental plugins
# ~* T) u% g! P4 k! N- U  -e ENABLEPLUGINS, --enable-plugins ENABLEPLUGINS
- Y/ Z6 u1 _+ n3 L- w! |/ |                        enable these plugins2 m4 P# m9 s# v& F% \9 \" Q
  -k PLUGOPTS, --plugin-option PLUGOPTS
9 p" o! {6 W" e1 y- Z6 K                        plugin options in plugname.option=value format (see
1 d; t  c7 F8 a  {                        -l)9 R( a( o& `" ~
  --label LABEL, --name LABEL
3 I/ z4 o! L! j# F                        specify an additional report label
" m7 y$ [- b% ?- b3 ]( B5 W  -l, --list-plugins    list plugins and available plugin options/ l5 {( I1 [3 N7 k# ~% o
  --list-presets        display a list of available presets4 ~! h1 R$ V# V
  --list-profiles       display a list of available profiles and plugins that8 Y5 Q8 e2 k; e: }" ~& d* P% g* W
                        they include+ R' m7 H5 h! x9 N
  --log-size LOG_SIZE   limit the size of collected logs (in MiB)7 ~, Z  ]2 V$ @0 ]
  -n NOPLUGINS, --skip-plugins NOPLUGINS
* `% G4 A/ O/ k. B1 q7 Q/ m4 h                        disable these plugins
* C5 S9 |. g8 W+ E+ |  --no-report           disable HTML/XML reporting
. r. p( z! w7 D6 [! H  y  --note NOTE           Behaviour notes for new preset# X/ y: I) Q+ \! F/ M1 N
  -o ONLYPLUGINS, --only-plugins ONLYPLUGINS
, e9 ]: I- N8 f7 E                        enable these plugins only
$ B6 D  V  J, ~. H( P  --preset PRESET       A preset identifier4 K- G4 i; m, x7 _
  -p PROFILES, --profile PROFILES
) B+ n5 W6 Z2 Y3 D                        enable plugins used by the given profiles$ S3 j! n; x3 s" @5 d5 ^3 y* V7 K( p
  --quiet               only print fatal errors  J- b8 }* m4 I3 F0 J! C9 b4 D9 ]
  -s SYSROOT, --sysroot SYSROOT
  y9 f# |* g8 z6 p9 b( F* y) Y                        system root directory path (default='/')8 {& K/ z6 f0 l* c1 Z9 r
  --ticket-number CASE_ID
' K( c6 p# p5 y/ A, k( S9 I                        specify ticket number
% W% F4 s, J$ r/ b; u& G  --tmp-dir TMP_DIR     specify alternate temporary directory
6 F3 M+ x- R4 |; Z' V  -v, --verbose         increase verbosity4 X) Z# Q1 w9 U
  --verify              perform data verification during collection0 K2 A6 u$ T* c; q* B, Y# i
  -z COMPRESSION_TYPE, --compression-type COMPRESSION_TYPE% `  \4 E$ [0 C) ]5 ?
                        compression technology to use [auto, gzip, bzip2, xz]
8 V, z3 ?. m1 H                        (default=auto)
8 V# J, ~( t* q9 J  -t THREADS, --threads THREADS
$ I) q9 @) u# u- a, a                        specify number of concurrent plugins to run
, t% q: P/ S" I8 h& ]5 |7 N6 Q                        (default=4)4 s& \- g& R2 y. V: _
  --add-preset ADD_PRESET
3 r; E7 r7 k; v' n                        Add a new named command line preset
2 F0 f( g0 Z; U  --del-preset DEL_PRESET
7 Q4 C7 Y5 U/ O8 b6 ^                        Delete the named command line preset' g7 {/ O4 W& {7 A3 o7 }
  --encrypt-key ENCRYPT_KEY
% O% [2 A# r$ V" q                        Encrypt the final archive using a GPG key-pair7 I1 i) v/ f& x
  --encrypt-pass ENCRYPT_PASS8 A1 e$ x) n! s! Y5 ?
                        Encrypt the final archive using a password
) W  ~+ r' J5 x( _/ f$ l( [. D
9 T4 a; O1 x" z4 P0 {. }" z7 g! S
" g$ |( g9 v5 n2 n9 D2 p[root@localhost ~]#  sosreport -a
/ I% m2 q  a+ L6 J- C# qsosreport (version 3.6)
) C) I) r: G3 jThis command will collect diagnostic and configuration information from, F+ q4 j+ v# I1 B- i. d
this Red Hat Enterprise Linux system and installed applications.: [) ^' \6 G9 S' C9 K! [+ x
An archive containing the collected information will be generated in
% `, N; m: l2 j/var/tmp/sos.TZJHtD and may be provided to a Red Hat support9 R& {6 ?6 s0 e2 B( I9 o
representative.
- C5 N9 i3 a* R; ~4 Z& jAny information provided to Red Hat will be treated in accordance with; K+ H0 f, [; t) G, ~6 Q& m% [
the published support policies at:, B3 Y+ q) l6 [8 e* q: H% p# O0 V
  https://access.redhat.com/support/' Q! V. g' L: a; l
The generated archive may contain data considered sensitive and its
6 X; C- v& N3 B* v5 {! R0 V! k1 L3 Bcontent should be reviewed by the originating organization before being
: _6 y- N7 P9 |7 f( i; W" u) npassed to any third party.
8 e0 e' M- |. J" T6 m6 vNo changes will be made to system configuration.
5 P: m: U% I( k6 ^1 T  QPress ENTER to continue, or CTRL-C to quit.
4 m9 f  Y- ?) M. oPlease enter the case id that you are generating this report for []: 7 v- @- _0 a! I, P; |
Setting up archive ...$ Z, b+ F" T$ M3 T3 @) u" i
Setting up plugins ...; X! L  B4 n: C/ a

, z$ {" b  J0 }" n" }. XRunning plugins. Please wait ...
2 R& Z3 M* s. W& v  Starting 90/106 systemd         [Running: postfix rpm selinux systemd]                  : a1 ]- ?' P: [3 K3 d- @

: s; G9 l# L# e7 ^* \
! L( [% `2 M* `  k1 UYour sosreport has been generated and saved in:
7 j: j1 c& T3 Z8 d% Y  l( I/ ?. y  /var/tmp/sosreport-localhost-2021-11-15-wihnsdi.tar.xz2 i3 \$ @- \1 b; J) E) H. G% A$ k
The checksum is: 7327254563dc3bd72626772f4754a0f66 p  A( d+ Y6 J3 P9 p: o
Please send this file to your support representative.
# A: v) ^: U. g) D8 k8 f+ F3 c% T7 E7 \6 Y* o  P! f

8 @# n( L% V+ @- a9 l
) p4 o) \9 z" _+ a. U0 B! y& e4 n

3 ~" s( G3 p) `* F6 w5 X' n' ?% C; }/ e

$ u' r9 x0 [; u% `* ?' G[root@localhost ~]# cat /etc/sos.conf# t! b# z3 W7 }# l
[plugins]
% S. o' f- u# R1 A7 ?" m, i#disable = rpm, selinux, dovecot: {0 o6 ]7 k+ _  k
[tunables]* Q9 c4 y7 E8 K! @: z/ P- l
#rpm.rpmva = off
& }& d4 t" p1 c; ?3 O#general.syslogsize = 151 K: P% }8 f! e# t* y5 J

7 L9 M1 L4 w. H$ C
/ X5 r8 G# q; d' z
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-12 03:04 , Processed in 0.025201 second(s), 23 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表