Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use Sosreport in linux

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail how to use Sosreport in linux. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

Sosreport: an extensible and portable tool that supports data collection. It is a tool that collects system configuration details and diagnostics from Unix-like operating systems. When a user submits a support service order, he / she must run the tool and send the result report generated by the Sosreport tool to the Red Hat support staff. The executive will then conduct a preliminary analysis based on the report and try to identify problems in the system. Not only on RHEL systems, you can use it on any Unix-like operating system to collect system logs and other debugging information.

Install Sosreport

Sosreport is in the official Red Hat system repository, so you can install it using Yum or DNF package manager, as shown below.

$sudo yum install sos

Or,

$sudo dnf install sos

Run on Debian, Ubuntu, and Linux Mint:

$sudo apt install sosreport usage

After installation, run the following command to collect system configuration details and other diagnostic information.

$sudo sosreport

You will be asked to enter some details of the system, such as system name, case ID, etc. Enter the details accordingly and press enter to generate the report. If you don't want to change anything and use the default values, just press enter.

Sample output from my CentOS 7 server:

Sosreport (version 3.5) This command will collect diagnostic and configuration information fromthis CentOS Linux system and installed applications. An archive containing the collected information will be generated in/var/tmp/sos.DiJXi7 and may be provided to a CentOS supportrepresentative. Any information provided to CentOS will be treated in accordance withthe published support policies at: https://wiki.centos.org/ The generated archive may contain data considered sensitive and itscontent should be reviewed by the originating organization before beingpassed 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 [server.ostechnix.local]: Please enter the case id that you are generating this report for []: Setting up archive... Setting up plugins... Running plugins. Please wait... Running 73/73: yum...Creating compressed archive... Your sosreport has been generated and saved in:/var/tmp/sosreport-server.ostechnix.local-20180628171844.tar.xz The checksum is: 8f08f99a1702184ec13a497eff5ce334 Please send this file to your support representative.

If you do not want to be prompted for such details, please use batch mode as follows.

$sudo sosreport-batch

As you can see in the output above, an archived report is generated and saved in / var/tmp/sos.DiJXi7. In RHEL 6/CentOS 6, the report will be generated in / tmp. You can now send this report to your support staff so that he can conduct a preliminary analysis and find out what the problem is.

You may be worried or want to know what is in the report. If so, you can view it by running the following command:

$sudo tar-tf / var/tmp/sosreport-server.ostechnix.local-20180628171844.tar.xz

Or,

$sudo vim / var/tmp/sosreport-server.ostechnix.local-20180628171844.tar.xz

Note that the above command does not extract the archive, but only displays a list of files and folders in the archive. If you want to see the actual contents of the files in the archive, first extract the archive using the following command:

$sudo tar-xf / var/tmp/sosreport-server.ostechnix.local-20180628171844.tar.xz

All the contents of the archive will be extracted from the ssosreport-server.ostechnix.local-20180628171844/ directory in the current working directory. Enter the directory and use the cat command or any other text browser to view the contents of the file:

$cd sosreport-server.ostechnix.local-20180628171844/ $cat uptime17:19:02 up 1:03, 2 users, load average: 0.50,0.17,0.10

For more details on Sosreport, see the man pages.

This is the end of the $man sosreport article on "how to use Sosreport in linux". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report