sosreport -a --report

时间:2019-09-28
本文章向大家介绍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 --helpman 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的更多相关文章

  1. linux信息收集篇之sosreport

    sosreport是一个类型于supportconfig 的工具,sosreport是python编写的一个工具,适用于centos(和redhat一样,包名为sos).ubuntu(其下包名为sos ...

  2. 【Linux命令】系统状态检测命令8个(ifconfig、uname、uptime、free、who、last、history、sosreport)

    目录 ifconfig获取网卡配置信息 uname查看系统内核版本 uptime查看系统的负载信息 free查看内存信息 who查看当前主机用户的终端信息 last查看系统的登录记录 history查 ...

  3. RHEL sosreport

    RHEL sosreport简介 sosreport对很多RedHat爱好者来说应该并不陌生! 它是一款在RedHat Linux下帮你收集系统信息打成一个tar包的工具,你可以将这个tar包发给供应 ...

  4. 2.ASP.NET MVC 中使用Crystal Report水晶报表

    上一篇,介绍了怎么导出Excel文件,这篇文章介绍在ASP.NET MVC中使用水晶报表. 项目源码下载:https://github.com/caofangsheng93/CrystalReport ...

  5. Monthly Income Report – August 2016

    原文链接:https://marcoschwartz.com/monthly-income-report-august-2016/ Every month, I publish a report of ...

  6. 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 ...

  7. Session for SSRS Report of Microsoft Dynamics AX

    Session for SSRS Report of Microsoft Dynamics AX 版权声明:本文为博主原创文章,未经博主允许不得转载. Contract •A data contrac ...

  8. Report processing of Microsoft Dynamic AX

    Report processing of Microsoft Dynamic AX 版权声明:本文为博主原创文章,未经博主允许不得转载. The implementation of a general ...

  9. Utility3:Understand Dashboard Report

    To see data in the SQL Server Utility dashboard, select the top node in the Utility Explorer tree - ...

随机推荐

  1. MongoDB教程--配置与入门

    MongoDB简介 阿里云配置MongoDB 数据库的增删查改 MongoDB 数据最重要的操作是Key-Value的映射.有了这样的映射,可以直接通过关键字去寻找想要的值.例如,通过用户的ID寻找与 ...

  2. openGL常见函数意义

    最近在课程上在学习计算机图像,对于突然冒出来的好多glut库里的函数感觉很难招架.把示例代码一行行百度下来,总算是差不多理解了大概的意思,在这里分享一下绘制图像需要的基础的函数. 1. 配置环境 对于 ...

  3. tensorflow学习--数据加载

    文章主要来自Tensorflow官方文档,同时加入了自己的理解以及部分代码 数据读取 TensorFlow程序读取数据一共有3种方法: 供给数据(Feeding): 在TensorFlow程序运行的每 ...

  4. Kafka优雅应用

    Kafka API实战 注意版本问题这个,kafka-client要和kafka的版本一致 <dependency> <groupId>org.apache.kafka< ...

  5. 剑指offer二刷(精刷)

    剑指 Offer 03. 数组中重复的数字 题目描述 在一个长度为 n 的数组里的所有数字都在 0 到 n-1 的范围内.数组中某些数字是重复的,但不知道有几个数字是重复的,也不知道每个数字重复几次. ...

  6. 如何在CSS中映射的鼠标位置,并实现通过鼠标移动控制页面元素效果

    映射鼠标位置或实现拖拽效果,我们可以在 JavaScript 中做到这一点.但实际上,在CSS中有更加简洁的方法,我们可以在不使用JavaScript 的情况下,仍然可以实现相同的功能! 只使用CSS ...

  7. 实现spaCy实体标注模型

    命名实体识别是指对现实世界中某个对象的名称的识别.与词性标注一样,是自然语言处理的技术基础之一.它的作用主要是通过模型识别出文本中需要的实体,也可以推导出实体之间的关系(实体消歧). 本文介绍的是运用 ...

  8. logstash收集springboot日志

    logstash收集springboot日志 maven依赖 <dependency> <groupId>net.logstash.logback</groupId> ...

  9. map的遍历方法 map.entrySet()

    代码: @Test public void TestMap() throws Exception { Map<String, String> map = new HashMap<&g ...

  10. 三. 初步认识Eureka注册中心

    Eureka Eureka是Netflix公司出品,英文直译:发现了,找到了! 认识Eureka (一)首先我们来解决第一问题,服务的管理. Ⅰ.早期开发模式中出现的问题 再早期开发时业务时,首先模块 ...