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

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

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2021-11-15 10:50:32 | 显示全部楼层 |阅读模式
sosreport命令linux系统收集系统信息# u, ~5 Y$ K7 G+ M: T
[root@localhost os]# sosreport --help
( B1 x' w* N# Lusage: sosreport [options]; q  \: R1 y7 G& ~
Some examples:, F& z) T+ b  A6 @8 k
enable dlm plugin only and collect dlm lockdumps:$ _0 r- n& b- P( T; W
  # sosreport -o dlm -k dlm.lockdump# S( s" ^  l; k3 H
disable memory and samba plugins, turn off rpm -Va collection:9 i$ ~# l+ A  \# @9 W, @1 j
  # sosreport -n memory,samba -k rpm.rpmva=off1 Q: I* [! y3 |) j; d
optional arguments:
$ _; Z* H2 J3 G  g  -h, --help            show this help message and exit2 |1 i( C% K+ A) |
  -a, --alloptions      enable all options for loaded plugins
; {0 }" X. P1 h# x5 _  --all-logs            collect all available logs regardless of size) s7 h- W5 K$ |. o" _  y# N9 J  I
  --batch               batch mode - do not prompt interactively
+ D7 v3 L8 @- N( Z  --build               preserve the temporary directory and do not package7 \. ]# N" z! n, A
                        results
6 C9 I( T8 Z1 ]7 |( _# L' ?  --case-id CASE_ID     specify case identifier7 x# N  }5 ^0 S# J
  -c CHROOT, --chroot CHROOT! j0 I! n! m  [
                        chroot executed commands to SYSROOT [auto, always,- ~/ n  m; B( [
                        never] (default=auto)
$ d0 j9 U& B1 ^7 e  --config-file CONFIG_FILE$ ~/ e( S/ J6 [& ^4 P
                        specify alternate configuration file5 C& A7 |" q' r) V/ H
  --debug               enable interactive debugging using the python debugger
( d7 S9 c$ X* G2 s$ Y" c! o) D: Y( i1 m  --desc DESC, --description DESC
* T: B2 e- E& V% [: S                        Description for a new preset3 Z, M; u! A" I$ b3 P7 l* v% L
  --experimental        enable experimental plugins/ @$ v4 A8 P& x" U1 N, f$ m
  -e ENABLEPLUGINS, --enable-plugins ENABLEPLUGINS9 Q5 _0 @: L& l4 E6 }0 R/ f# s
                        enable these plugins
( X7 `/ P% d4 T( J  -k PLUGOPTS, --plugin-option PLUGOPTS, C' _; S3 p0 \* W& t" e" n
                        plugin options in plugname.option=value format (see
/ Y6 U# `4 M9 S/ c) Q" O4 T+ @                        -l)
3 O4 t) B8 x4 f  --label LABEL, --name LABEL
% }- C6 o0 k4 w2 j+ k' H$ N# T                        specify an additional report label1 y6 j) H: `) m
  -l, --list-plugins    list plugins and available plugin options0 i( s$ a0 N* @- l' ]& V$ G  f$ I
  --list-presets        display a list of available presets
' F/ M. J! @: O+ e9 v+ z  --list-profiles       display a list of available profiles and plugins that8 Z% ?  x- |2 _; j
                        they include# J$ u8 L* f- V
  --log-size LOG_SIZE   limit the size of collected logs (in MiB)
, y; N" p4 X1 f+ R+ d* T7 a- S  -n NOPLUGINS, --skip-plugins NOPLUGINS3 |# ^) C! ?' [3 T. K& C
                        disable these plugins$ s) G! K7 t9 i  _8 [
  --no-report           disable HTML/XML reporting
7 ^$ W/ Q; z- v" N% J. [- R  --note NOTE           Behaviour notes for new preset$ G+ o, B* }; p" X+ u9 B% u
  -o ONLYPLUGINS, --only-plugins ONLYPLUGINS
% M" R; G! c: C4 j$ A                        enable these plugins only5 v6 e4 R' w0 r; P& f1 w% Z7 |) M
  --preset PRESET       A preset identifier
8 Q2 z4 ?5 `5 E/ `1 O$ O: u: g& g  -p PROFILES, --profile PROFILES2 @& A1 I% Z' y1 l* C
                        enable plugins used by the given profiles0 A: d7 B! q' D6 L& h+ B; L
  --quiet               only print fatal errors# S) e/ e8 j! [/ t& [4 ]
  -s SYSROOT, --sysroot SYSROOT
( h- y* K. R$ t' M- u/ d* E+ m                        system root directory path (default='/')
; p! N  c+ {$ p* @( i5 T* r( C  --ticket-number CASE_ID- S" V, w# N/ Z, w6 P
                        specify ticket number
" G" z/ r& _) D  B, x" o  --tmp-dir TMP_DIR     specify alternate temporary directory3 @, ]9 b3 w# @& ^" ^# C, @
  -v, --verbose         increase verbosity
, r8 T- o$ l$ Q: e8 k9 b  --verify              perform data verification during collection
- q. q& W7 e9 ^+ x  -z COMPRESSION_TYPE, --compression-type COMPRESSION_TYPE
- B7 D+ d  x5 Y& V& \7 J" J8 ?                        compression technology to use [auto, gzip, bzip2, xz]
& _2 c4 U) E" e+ q" z0 }( [3 V                        (default=auto). U' @9 p0 z' E/ a9 G. {  |
  -t THREADS, --threads THREADS
+ B9 Z; e5 L1 d' Z: r( H8 c                        specify number of concurrent plugins to run
0 K* O" n7 z' m$ Z( R                        (default=4)
+ F9 ~8 T& x( f5 x& L) L  --add-preset ADD_PRESET1 r7 J% X, j: u
                        Add a new named command line preset
" y/ L! l9 k. e7 h: m/ f/ _  --del-preset DEL_PRESET: ^2 k0 U1 B8 G
                        Delete the named command line preset
8 {; b7 T5 }& \1 y1 c  --encrypt-key ENCRYPT_KEY4 P( V/ `9 J% r7 B: e
                        Encrypt the final archive using a GPG key-pair
& A( _4 u, s. h7 i" V) d  --encrypt-pass ENCRYPT_PASS) P( V5 }' c. j  S/ w
                        Encrypt the final archive using a password, U) B5 A. p) ^/ S5 W
: P) L# V% F2 w& f. R6 ], N
4 ^) u  c; B. j# v) {* H, E8 t; S
[root@localhost ~]#  sosreport -a 5 S6 U5 v4 r) J' r4 x6 z& l3 }
sosreport (version 3.6)
9 v9 D4 x2 A: zThis command will collect diagnostic and configuration information from# @& Z/ Q9 H# k6 H9 }. @7 n
this Red Hat Enterprise Linux system and installed applications.: {8 W/ ~1 \+ g3 l1 R
An archive containing the collected information will be generated in
& O5 c; [* ^, t/var/tmp/sos.TZJHtD and may be provided to a Red Hat support
4 C, k8 ^1 S1 {# Erepresentative.
3 I/ M4 t! w) i/ ~. m( P! yAny information provided to Red Hat will be treated in accordance with& g; g0 n- u6 l1 n  R( V3 ~
the published support policies at:
+ u$ n" P, A: ?, Y  https://access.redhat.com/support/
* @& D. `5 ]" a) i4 jThe generated archive may contain data considered sensitive and its" z+ j! h; H3 j8 m( R9 r0 j
content should be reviewed by the originating organization before being
' k; _/ Z* A& Z, O' Lpassed to any third party.
9 @5 H% R; L* F# b* XNo changes will be made to system configuration.
6 z; {: I2 X8 Z$ b  `; wPress ENTER to continue, or CTRL-C to quit.
" u* v1 N1 W! P- G0 }% yPlease enter the case id that you are generating this report for []:
% f2 c' h* R9 \ Setting up archive ...3 s& u2 T; O5 i$ O' T
Setting up plugins ...
' ~* b3 r) S9 y# Z# ]* q
' x9 A. r* W) V2 GRunning plugins. Please wait ...
, U8 M0 d' P* t  Starting 90/106 systemd         [Running: postfix rpm selinux systemd]                  
4 {8 |6 }1 X  M7 y* w" d$ `, Q: U; k6 g" Z! [* d" u7 V3 V
$ Q$ p+ a( U! s- \; V
Your sosreport has been generated and saved in:
+ w3 Z8 z6 F5 y. s+ o, ~  /var/tmp/sosreport-localhost-2021-11-15-wihnsdi.tar.xz/ D& B" X; X0 j
The checksum is: 7327254563dc3bd72626772f4754a0f6
; J9 n6 n) ^6 M7 y4 vPlease send this file to your support representative.
/ g4 z, k$ `  |7 ^) |8 _$ W3 x" F, E; [/ t8 \) E
$ z; s0 W9 Z6 L5 d; h. n9 ~3 M
7 H2 c2 j3 ?, M7 y
- t- t5 k2 R) ~: h
( x! L9 V* t8 Q' h
3 G9 D2 L9 a9 z
* Z2 J8 {8 Y% d- L2 U" g
[root@localhost ~]# cat /etc/sos.conf
  \5 {# k; Z" _% {$ |  i[plugins]+ k9 _$ m7 q/ C" ?" b
#disable = rpm, selinux, dovecot
1 B1 o3 p' V4 t: X3 e; B[tunables]
( Z5 ?* ?; `2 _3 B; q#rpm.rpmva = off
: z: P8 ^% [- @1 V" `#general.syslogsize = 15
, l! I* y& y/ ?2 s$ c0 y; i& x
7 ~/ d, S- U0 G* o, m
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-12 01:55 , Processed in 0.015260 second(s), 23 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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