sosreport command
sosreport is a type of tool to supportconfig, sosreport is a tool written in python, suitable for centos (redhat and like package called sos), ubuntu (under which a package named sosreport) such as most versions of linux. sosreport hosted on github page is: https://github.com/sosreport/sos , and the default source in many systems have been integrated. If you are using genuine redhat, in the event of a system problem, seek official support, the official will generally be analyzed by viewing the collected information sosreport. Note that in some old redhat release called sysreport ------ As in previous versions of redhat4.5.
A, sosreport installation
When using linux distribution source for installation by default, because the package names on different systems will vary, so use a different command, such as installation and ubuntu redhat platform are as follows:
Installation on RedHat // / CentOS
# yum -Y insatll SOS
installed under Ubuntu //
# the sudo APT-GET the install by sosreport
Two, sosreport usage
You can use sosreport - Help or man sosreport get help manual to use, as follows:
[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
The above also lists examples of specific operations. -L option which lists all current services and plug-ins enable and disable all plug-ins currently available in.
[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.
As indicated above, I use all the modules to enable -A, - report is on all the results html / xml format of a general report. Generating packets need to be unpacked by the following command.
*** the xz -d #. Tar.xz # tar -xvf ***. Tar or directly in one step using the following command unpack tar xvJf ***. Tar.xz
After unpacking sos_reports directory will report results sos.html file generation, while there will be sos.txt file generation, list some specific information about the command execution and copy files within the file. html opened as follows: