sosreport -a --report
sosreport -a --report
sosreport命令
sosreport是一个类型于supportconfig 的工具,sosreport是python编写的一个工具,适用于centos(和redhat一样,包名为sos)、ubuntu(其下包名为sosreport)等大多数版本的linux 。sosreport在github上的托管页面为:https://github.com/sosreport/sos,而且默认在很多系统的源里都已经集成有。如果使用的是正版redhat,在出现系统问题,寻求官方支持时,官方一般也会通过sosreport将收集的信息进行分析查看。需要注意的是在一些老的redhat发行版中叫sysreport ------ 如redhat4.5之前的版本中。
一、sosreport的安装
在默认使用linux发行版的源进行安装时,由于在不同的系统上包名称也会有差异,所以使用的命令也不同,如redhat和ubuntu平台的安装如下:
// redhat/centos下的安装
# yum -y insatll sos
// ubuntu下的安装
# sudo apt-get install sosreport
二、sosreport用法
可以使用sosreport --help或man sosreport 获取使用帮助手册,如下:
[root@QQ ~]# sosreport --help
Usage: sosreport [options]
Options:
-h, --help show this help message and exit
-l, --list-plugins list plugins and available plugin options
-n NOPLUGINS, --skip-plugins=NOPLUGINS
disable these plugins
-e ENABLEPLUGINS, --enable-plugins=ENABLEPLUGINS
enable these plugins
-o ONLYPLUGINS, --only-plugins=ONLYPLUGINS
enable these plugins only
-k PLUGOPTS, --plugin-option=PLUGOPTS
plugin options in plugname.option=value format (see
-l)
-a, --alloptions enable all options for loaded plugins
--batch batch mode - do not prompt interactively
--build keep sos tree available and dont package results
-v, --verbose increase verbosity
--quiet only print fatal errors
--debug enable interactive debugging using the python debugger
--ticket-number=TICKET_NUMBER
specify ticket number
--name=CUSTOMER_NAME specify report name
--config-file=CONFIG_FILE
specify alternate configuration file
--tmp-dir=TMP_DIR specify alternate temporary directory
--report Enable HTML/XML reporting
--profile turn on profiling
-z COMPRESSION_TYPE, --compression-type=COMPRESSION_TYPE
compression technology to use [auto, zip, gzip, bzip2,
xz] (default=auto)
Some examples:
enable cluster plugin only and collect dlm lockdumps:
# sosreport -o cluster -k cluster.lockdump
disable memory and samba plugins, turn off rpm -Va collection:
# sosreport -n memory,samba -k rpm.rpmva=off
上面也列出了具体操作的示例。其中-l 参数会列出当前enable和disable的所有服务插件及当前available的所有插件。
[root@QQ log]# sosreport -a --report
sosreport (version 3.0)
This command will collect diagnostic and configuration information from
this CentOS Linux system and installed applications.
An archive containing the collected information will be generated in
/var/tmp and may be provided to a CentOS support representative.
Any information provided to CentOS will be treated in accordance with
the published support policies at:
https://www.centos.org/
The generated archive may contain data considered sensitive and its
content should be reviewed by the originating organization before being
passed to any third party.
No changes will be made to system configuration.
Press ENTER to continue, or CTRL-C to quit.
Please enter your first initial and last name [361way.com]:
Please enter the case number that you are generating this report for:
Running plugins. Please wait ...
Running 68/68: yum...
Creating compressed archive...
Your sosreport has been generated and saved in:
/var/tmp/sosreport-361way.com-20140912204339.tar.xz
The checksum is: eaf5b2cbb1e9be68d41be5e5a60a61b6
Please send this file to your support representative.
如上所示,我使用-A 启用所有的模块,--report是开启所有的结果以html /xml 的格式一个总的报告。生成的包需要通过下面的命令进行解包。
# xz -d ***.tar.xz
# tar -xvf ***.tar
或直接使用下面的命令一步完成解压
tar xvJf ***.tar.xz
在解包后的sos_reports 目录会有report的结果sos.html文件生成,同时会有sos.txt文件生成,该文件内列出了具体执行的命令及copy 文件的一些信息。html 打开的内容如下:
sosreport -a --report的更多相关文章
- linux信息收集篇之sosreport
sosreport是一个类型于supportconfig 的工具,sosreport是python编写的一个工具,适用于centos(和redhat一样,包名为sos).ubuntu(其下包名为sos ...
- 【Linux命令】系统状态检测命令8个(ifconfig、uname、uptime、free、who、last、history、sosreport)
目录 ifconfig获取网卡配置信息 uname查看系统内核版本 uptime查看系统的负载信息 free查看内存信息 who查看当前主机用户的终端信息 last查看系统的登录记录 history查 ...
- RHEL sosreport
RHEL sosreport简介 sosreport对很多RedHat爱好者来说应该并不陌生! 它是一款在RedHat Linux下帮你收集系统信息打成一个tar包的工具,你可以将这个tar包发给供应 ...
- 2.ASP.NET MVC 中使用Crystal Report水晶报表
上一篇,介绍了怎么导出Excel文件,这篇文章介绍在ASP.NET MVC中使用水晶报表. 项目源码下载:https://github.com/caofangsheng93/CrystalReport ...
- Monthly Income Report – August 2016
原文链接:https://marcoschwartz.com/monthly-income-report-august-2016/ Every month, I publish a report of ...
- Step by step Install a Local Report Server and Remote Report Server Database
原创地址:http://www.cnblogs.com/jfzhu/p/4012097.html 转载请注明出处 前面的文章<Step by step SQL Server 2012的安装 &g ...
- Session for SSRS Report of Microsoft Dynamics AX
Session for SSRS Report of Microsoft Dynamics AX 版权声明:本文为博主原创文章,未经博主允许不得转载. Contract •A data contrac ...
- Report processing of Microsoft Dynamic AX
Report processing of Microsoft Dynamic AX 版权声明:本文为博主原创文章,未经博主允许不得转载. The implementation of a general ...
- Utility3:Understand Dashboard Report
To see data in the SQL Server Utility dashboard, select the top node in the Utility Explorer tree - ...
随机推荐
- 18. vue-router案例-tabBar导航
目标: 做一个导航tabbar 一. 分析 我们的目标是做一个导航tabbar, 要求 这个导航不仅可以在一个页面使用, 可以在多个页面通用 每个页面的样式可能不一样 每个页面的图标, 文字可能不一样 ...
- java面试-JVM内存结构
一.JVM内存结构 二.类加载(classLoader)机制 java中的ClassLoader详解 java类加载机制面试题 java类加载机制面试题 虚拟机把描述类的数据从Class文件加载到内存 ...
- C/C++中的const
1 C中的const C中const修饰的变量是只读变量,在使用const关键字声明定义变量时会给该变量分配内存空间. const修饰的全局变量默认是外部链接的,即其它源文件可以直接使用该变量. co ...
- IDEA如何在一个项目空间下管理多个项目?
用过Eclipse和IDEA编程工具都知道,Eclipse创建新项目时都是在同一项目空间下,而IDEA一个项目空间只能有一个项目,创建项目时会创建.idea文件. 所以每次创建完项目或者打开另一个项目 ...
- Unknown custom element: <componentName> - did you register the component correct?
最近开发的时候遇见一个头疼的事情,之前用过的组件没有出现过任何问题,但偏偏在其他目录下引用就出问题了. 组件的名称.import的路径都没任何问题,看了其他人遇到的问题和官方文档关于组件name属性的 ...
- 研发团队管理:IT研发中项目和产品原来区别那么大,项目级的项目是项目,产品级的项目是产品!!!
前言 从事IT行业多年,一路从小杂兵成长为大团队Leader,对于研发整个体系比较清楚,其实大多人都经历过但是都忽略了的研发成本管控的一个关键的点就是研发过程中项目级和产品级的区别. 市场基本 ...
- Socket简介 与 UDP
1. Socket 简介 2. UDP 1. Socket 简介 网络编程,是指让在不同的电脑上的软件能够进行数据传递,即进程之间的通信. 本地的进程间通信(IPC) 例如有:队列.同步(互斥锁.条件 ...
- k8s endpoints k8s未配置选择器的service
service 其实是一个TCP/UDP 代理 不仅可以代理Pod也可以代理其他的非Pod资源,例如外网的数据库,或者其他的资源 创建未配置选择器的service, service 的对外端口是500 ...
- MySQL数据库干货分享!mysql每月自动创建表结构
如果你刚好在学MySQL,博主推荐一套很详细的MySQL教程 主要详细讲解了MySQL的相关知识,包括MySQL概述,MySQL应用环境,MySQL系统特性,MySQL初学基础,MySQL管理工具,如 ...
- PAT归纳总结——关于模拟类问题的一些总结
关于时间的模拟问题 在刷题的过程中碰到了一些关于时间先后顺序的模拟题目,刚开始做的时候确实挺麻烦的,今天把这类问题的解题思路来整理一下. 比较典型的有: 1017 Queueing at Bank 1 ...