易陆发现互联网技术论坛

 找回密码
 开始注册
查看: 1320|回复: 0
收起左侧

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

[复制链接]
发表于 2021-11-15 10:50:32 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?开始注册

x
sosreport命令linux系统收集系统信息# K" o" |0 d' H9 H' [
[root@localhost os]# sosreport --help/ H( t! q+ Y; d% p* K7 M
usage: sosreport [options]+ ^% e( J% `+ v; u" d* ]
Some examples:! ?' v& d! I# O0 A* }0 L
enable dlm plugin only and collect dlm lockdumps:1 |. l5 B* N+ Q4 Q
  # sosreport -o dlm -k dlm.lockdump/ g  T) q. B1 m3 Y6 t& P+ n
disable memory and samba plugins, turn off rpm -Va collection:
% n4 k/ n1 S& Y0 N* R  E  H  # sosreport -n memory,samba -k rpm.rpmva=off" n; `  Z2 g4 b  S/ u
optional arguments:6 p5 E7 x. M( C( ~4 a" [
  -h, --help            show this help message and exit& t5 t1 |7 w7 I
  -a, --alloptions      enable all options for loaded plugins
8 S3 h4 c' I) s/ b  --all-logs            collect all available logs regardless of size9 j' G, b0 V. s3 E  B6 r" v1 n
  --batch               batch mode - do not prompt interactively
8 O3 f+ r" ?8 u/ |& g$ T3 X0 s  --build               preserve the temporary directory and do not package
! p. r4 x- C; ~* c5 d. ^4 c                        results' W; w: N% e& H& v: Y
  --case-id CASE_ID     specify case identifier
% L! n$ v8 o8 v; Q, }4 f  -c CHROOT, --chroot CHROOT
; k' l; i' |6 A9 {" s* D# o. M: i                        chroot executed commands to SYSROOT [auto, always,- H8 h' d( r$ ~- c; c
                        never] (default=auto)& J; x* |& j; K5 ^. c
  --config-file CONFIG_FILE
! [" U3 v' J, K! x  ]$ t/ m                        specify alternate configuration file& `. u) j6 l6 K' B7 }3 w
  --debug               enable interactive debugging using the python debugger
" B: p/ v+ g* A  --desc DESC, --description DESC5 H: M' a: ], B# Q; a, y- y; Y
                        Description for a new preset% }6 f$ ?) b  m6 ]  {$ S
  --experimental        enable experimental plugins  ]! s; \5 @1 ^% p2 G
  -e ENABLEPLUGINS, --enable-plugins ENABLEPLUGINS2 [" D5 C: s) U7 Y
                        enable these plugins
; {/ N' E& Q$ D% Y. c) G  -k PLUGOPTS, --plugin-option PLUGOPTS% [! m9 ^. K- c' ?3 ?" ~
                        plugin options in plugname.option=value format (see
" a7 v6 G4 v3 k( d! w& I: g                        -l)- o2 J3 \! s- {5 I; j; }6 o
  --label LABEL, --name LABEL  [6 S6 L& R0 T+ B1 g
                        specify an additional report label
- `- N. K' J4 _8 o/ M9 {  -l, --list-plugins    list plugins and available plugin options! J2 R: g4 H) ~7 q: b2 ]: q
  --list-presets        display a list of available presets
; E; S2 b' h  y% B  --list-profiles       display a list of available profiles and plugins that7 M' K* _5 k( H# L: R+ r
                        they include
3 P. Z+ m! [7 w  H4 O  --log-size LOG_SIZE   limit the size of collected logs (in MiB)
* j, n- c2 S" ?- K  -n NOPLUGINS, --skip-plugins NOPLUGINS& G0 ?2 i+ U, T& j5 I+ |
                        disable these plugins! O" w  N8 j1 B- D- G  }
  --no-report           disable HTML/XML reporting, ?. E3 x9 l  |% P, K
  --note NOTE           Behaviour notes for new preset" B: P* O# N; M$ w' s& D1 e( M$ C
  -o ONLYPLUGINS, --only-plugins ONLYPLUGINS; C( r4 X- g- K6 P- y
                        enable these plugins only$ V' N: l+ M3 R1 s5 ^0 S
  --preset PRESET       A preset identifier1 C% {( P. Q, Z: a6 k5 k
  -p PROFILES, --profile PROFILES+ B! G: f* z3 v4 x
                        enable plugins used by the given profiles
# w4 r/ j6 a' j, S! Y  --quiet               only print fatal errors3 m! B2 ^. T* d# R
  -s SYSROOT, --sysroot SYSROOT
: v1 i9 {! Q- X! y. z) N, p  S$ I                        system root directory path (default='/')
' x* q) V7 p4 G+ M3 \1 }  --ticket-number CASE_ID
. g8 b/ v8 u' a/ U4 z: Y5 U                        specify ticket number' s2 T+ f5 g% r
  --tmp-dir TMP_DIR     specify alternate temporary directory- l# e6 p* e# g9 T% J* _! B
  -v, --verbose         increase verbosity
) d8 y7 N, h0 V2 e- l  --verify              perform data verification during collection: K3 P7 t, V- N+ [% M
  -z COMPRESSION_TYPE, --compression-type COMPRESSION_TYPE4 Y5 i* ^$ H3 \) I/ j3 [) d# V7 m
                        compression technology to use [auto, gzip, bzip2, xz]
# Q' {% o' B$ {( b                        (default=auto)
  G+ j& n) {# U  -t THREADS, --threads THREADS. j5 O! D& ^/ ~# ^6 h9 M' m
                        specify number of concurrent plugins to run
5 ^; V8 f: u( i8 ~, \% N) v                        (default=4)
' ^9 E; l* K. o8 C/ m9 m. P- O* z  --add-preset ADD_PRESET% [( V% L# S+ h4 H
                        Add a new named command line preset
5 i( X& b. j" e  x* U  --del-preset DEL_PRESET: ^8 a. J( b* ^" J' o
                        Delete the named command line preset2 ~  }$ m; \, W  P
  --encrypt-key ENCRYPT_KEY
  L$ E$ F. [8 }3 r; Y3 l                        Encrypt the final archive using a GPG key-pair
% a% e( ?3 x* Q5 j/ y  --encrypt-pass ENCRYPT_PASS7 [& G; n; H, l& s& s
                        Encrypt the final archive using a password
0 R& Y& b( q5 `/ x  f4 ]6 v- p2 k& H8 X/ q' l- J! M

. |; q$ W$ b# l- @# `[root@localhost ~]#  sosreport -a 8 U) |4 z9 L0 Z+ N
sosreport (version 3.6)
! ]; R7 Z0 e9 j0 R( \6 _" eThis command will collect diagnostic and configuration information from4 f2 ]( h% d0 b
this Red Hat Enterprise Linux system and installed applications.
! f7 X9 z, b3 E% EAn archive containing the collected information will be generated in* m/ K: L; A9 b9 G
/var/tmp/sos.TZJHtD and may be provided to a Red Hat support
& p* i. |! s! F1 x8 |0 L3 ^' Qrepresentative.# u0 E; T7 z) R4 M0 y! e
Any information provided to Red Hat will be treated in accordance with
! l' i  l! y0 ?" _/ qthe published support policies at:. i4 f) ^9 ~% R7 U* v
  https://access.redhat.com/support/
/ x) m* @1 H7 ^( }0 I. u/ tThe generated archive may contain data considered sensitive and its
  J1 L( ^' V; N) X9 k9 \8 D& Vcontent should be reviewed by the originating organization before being4 }3 z; b! S& ]8 U: S
passed to any third party.
9 B4 x$ P% ~1 x; \No changes will be made to system configuration.
) U' B7 ]5 S2 P" K0 {Press ENTER to continue, or CTRL-C to quit.
* L+ b) B. ^, u( EPlease enter the case id that you are generating this report for []: 6 I9 f# k1 _* U( I
Setting up archive ...
  y4 p) B# n1 ?8 q6 S, Z Setting up plugins ...
" R% R1 U: G+ e) ?; ?" j  o! B  P" j! b  v8 N- a1 U% n  d. b
Running plugins. Please wait .../ F& B0 H! l8 c
  Starting 90/106 systemd         [Running: postfix rpm selinux systemd]                  
7 S. k8 }$ x! p( h" B) x) |1 K
6 W: ]4 Z' v) q) E& C  n: c
  t$ x* n0 S! F" M- M' ~Your sosreport has been generated and saved in:' A6 w5 {. X0 C1 b+ V
  /var/tmp/sosreport-localhost-2021-11-15-wihnsdi.tar.xz" T7 U4 U0 |  j
The checksum is: 7327254563dc3bd72626772f4754a0f6
+ V; L  O" o) y" g) PPlease send this file to your support representative.4 a4 p" D& F9 M# w, w* x
- b# }! t2 r* E. Q, m, h5 T

) K* Q! n: U0 r. f% a
' y( _& K7 D% E! q0 `" e8 k7 D$ r- c( T" ?* J
) A) k' ~% v, V7 O, ?

; b$ I) c' m. o9 q+ K5 h0 Y# I* w6 }
[root@localhost ~]# cat /etc/sos.conf
/ J+ `/ p' d& j: j6 |! i) a[plugins]3 M7 _- Y) x; _3 l2 n
#disable = rpm, selinux, dovecot% r( t7 T/ I& ?- `
[tunables]- a2 c  r- ^$ l4 q) N2 m( O1 Y
#rpm.rpmva = off
4 J. |4 x1 Z7 Z/ I4 R" v: R#general.syslogsize = 15
* g1 W" a4 V" m# i# b- `# D
1 h6 R$ n: Z; [& H, R% r. Z+ K( ^
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

站长推荐上一条 /4 下一条

北京云银创陇科技有限公司以云计算运维,代码开发

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )点击这里给我发消息

GMT+8, 2026-4-8 23:52 , Processed in 0.048755 second(s), 25 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

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