mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-02-03 23:40:14 +08:00
Merge pull request #1292 from geekpi/master
[Translated] How to create sosreport in linux (RHEL 5.X or RHEL 6.X)
This commit is contained in:
commit
f6447dae50
@ -1,44 +0,0 @@
|
||||
Translating--------geekpi
|
||||
|
||||
|
||||
How to create sosreport in linux (RHEL 5.X / RHEL 6.X)
|
||||
================================================================================
|
||||
**Sosreport** is a command in linux (**RHEL / CentOS**) which collects **system configuration** and diagnostic information of your linux box like running kernel version, loaded modules, and system and service configuration files. This command also runs external programs to collect further information, and stores this output in the resulting archive.
|
||||
|
||||
Sosreport is required when you have open a case with redhat for technical support. Redhat support Engineers will require sosreport of your server for troubleshooting purpose.
|
||||
|
||||
To run sosreport , **sos** package should be installed. Sos package is part of default installation in most of linux. If for any reason this package is no installed , then use below yum command to install **sos package** :
|
||||
|
||||
# yum install sos
|
||||
|
||||
### Generate the report ###
|
||||
|
||||
Open the terminal type sosreport command :
|
||||
|
||||
# sosreport
|
||||
|
||||
This command will normally complete within a **few minutes**. Depending on local configuration and the options specified in some cases the command may take longer to finish. Once completed, sosreport will generate a compressed a file under **/tmp** folder. Different versions use different compression schemes (**gz, bz2, or xz**). The file should be provided to Redhat support representative (normally as an attachment to an open case).
|
||||
|
||||
**Note**: sosreport requires root permissions to run.
|
||||
|
||||
### Different Options used in sosreport command : ###
|
||||
|
||||
The sosreport command has a **modular structure** and allows the user to enable and disable modules and specify module options via the command line. To **list available modules** (plug-ins) use the following command:
|
||||
|
||||
# sosreport -l
|
||||
|
||||
To turn off a module include it in a comma-separated list of modules passed to the -n/–skip-plugins option. For instance to disable both the kvmand amd modules:
|
||||
|
||||
# sosreport -n kvm,amd
|
||||
|
||||
Individual modules may provide additional options that may be specified via the -k option. For example on Red Hat Enterprise Linux 5 installations the sos rpm module collects "rpm -Va" output by default. As this may be time-consuming the behavior may be disabled via:
|
||||
|
||||
# sosreport -k rpm.rpmva=off
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.linuxtechi.com/how-to-create-sosreport-in-linux/
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
@ -0,0 +1,43 @@
|
||||
如何在linux中创建sosreport(RHEL 5.X / RHEL 6.X)
|
||||
================================================================================
|
||||
**Sosreport**是linux中的一个命令**RHEL / CentOS**),它会收集**系统配置**和你linux机器上如正在运行的内核版本、加载的模块和系统和服务配置文件之类的诊断信息。这个命令同样可以运行外部的程序来收集更多的信息,并存储这些输出到一个结论文档中。
|
||||
|
||||
Sosreport在你需要获得redhat的技术支持时需要它。Redhat的支持工程师会要求你服务器上的sosreport来用于故障排除。
|
||||
|
||||
To run sosreport , **sos** package should be installed. Sos package is part of default installation in most of linux. If for any reason this package is no installed , then use below yum command to install **sos package** :
|
||||
要运行sosreport,需要安装**sos** 包。Sos包是大多是linux的默认安装包中的一部分。如果有任何原因没有安装,那么运行下面的yum命令来安装**sos 包** :
|
||||
|
||||
# yum install sos
|
||||
|
||||
### 生成报告 ###
|
||||
|
||||
打开终端输入sosreport命令:
|
||||
|
||||
# sosreport
|
||||
|
||||
这条命令正常情况下会在**几分钟**里完成。根据本地配置,在某些情况下,某些选项可能需要更长的时间才能完成。一旦完成,sosreport将在**/ tmp目录**目录中生成压缩文件。不同版本使用不同的压缩方案(** gz,bz2,或xz**)。该文件应提供给红帽的支持代表(在开放的情况下通常作为附件)。
|
||||
|
||||
**注意**:sosreport需要root权限才能运行。
|
||||
|
||||
### sosreport命令中不同的选项: ###
|
||||
|
||||
sosreport命令有一个**模块化结构**,并允许用户启用和禁用模块,并通过在命令行指定模块。要**列出可用的模块**(插件),请使用以下命令:
|
||||
|
||||
# sosreport -l
|
||||
|
||||
要禁用一个模块,用逗号隔开的列表传给-n/–skip-plugins选项。比如要kvmand 、amd这两个模块:
|
||||
|
||||
# sosreport -n kvm,amd
|
||||
|
||||
各个模块可以通过-k选项提供额外的选项。例如,在Red Hat Enterprise Linux 5中安装的sos rpm模块默认收集“rpm -Va”的输出。因为这是个耗时行为,因此可以通过下面的命令禁用:
|
||||
|
||||
|
||||
# sosreport -k rpm.rpmva=off
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.linuxtechi.com/how-to-create-sosreport-in-linux/
|
||||
|
||||
译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
Loading…
Reference in New Issue
Block a user