GNU/Linux >> Linux の 問題 >  >> Linux

CentOS / RHEL :sosreport の収集方法

「sosreport」は、RHEL/CentOS システムのトラブルシューティング資料を収集するためのツールです。これは、Linux システムの最も重要なログと構成の概要を示すデバッグ情報の圧縮 tarball を生成し、Redhat サポートに送信します。特に、sosreport には、インストールされた rpm バージョン、syslog、ネットワーク構成、マウントされたファイルシステム、ディスク パーティションの詳細、ロードされたカーネル モジュール、およびすべてのサービスのステータスに関する情報が含まれます。

sosreport を実行するには、パッケージ「sos」をインストールする必要があります。これは通常、システムがカスタム パッケージ セットでインストールされていない限り、デフォルトでインストールされます。インストールされていない場合は、yum リポジトリからインストールできます。また、最新であることを確認することもお勧めします。

# yum install sos

sosreport を作成するには、端末でコマンドを引数なしで root として実行するのと同じくらい簡単です:

# sosreport

サポートケースに関連するいくつかの情報を求めます:

# sosreport

sosreport (version 2.2)

This utility will collect some detailed  information about the
hardware and setup of your Red Hat Enterprise Linux system.
The information is collected and an archive is  packaged under
/tmp, which you can send to a support representative.
Red Hat Enterprise Linux will use this information for diagnostic purposes ONLY
and it will be considered confidential information.

This process may take a while to complete.
No changes will be made to your system.

Press ENTER to continue, or CTRL-C to quit.

Please enter your first initial and last name [geeklab]: Sandeep
Please enter the case number that you are generating this report for [None]:

完了すると、サポート担当者がファイルの整合性を確認できるように、圧縮された tarball が md5sum を含むファイルとともに /tmp に作成されます。ファイル名が端末に出力されます:

Creating compressed archive...

Your sosreport has been generated and saved in:
  /tmp/sosreport-Sandeep-20151011150306-c847.tar.xz

The md5sum is: ef729c471178c87582ae422290c1c847

Please send this file to your support representative.

sosreport コマンドの実行時に TMPDIR 環境変数を設定することにより、/tmp 以外の場所に sosreport を作成することができます:

# TMPDIR=/home/jdoe sosreport

追加オプション

sosreport で利用可能なプラグインを一覧表示するには:

# sosreport -l

sosreport (version 2.2)

The following plugins are currently enabled:

 acpid           acpid related information
 anaconda        Anaconda / Installation information
 auditd          Auditd related information
 autofs          autofs server-related information
 bootloader      Bootloader information
 cgroups         cgroup subsystem information
 crontab         Crontab information
 devicemapper    device-mapper related information (dm, lvm, multipath)
 dovecot         dovecot server related information
 filesys         information on filesystems
 ............

システムに多数のパッケージがインストールされていて、sosreport の完了に時間がかかる場合、サポートは、rpm データベースの検証を無効にするように要求する場合があります (ファイルシステム上のすべてのパッケージ化されたファイルを rpm データベースに対して検証します)

# sosreport -k rpm.rpmva=off


Linux
  1. RHEL / CentOS :LVM ボリュームを縮小する方法

  2. CentOS / RHEL :LVM ボリュームを削除する方法

  3. CentOS / RHEL 6 :現在のランレベルを確認するにはどうすればよいですか?

  1. CentOS / RHEL 6 :kdump の設定方法

  2. CentOS / RHEL 6:telnet サービスを無効にする方法

  3. CentOS/RHEL 8 で NetworkManager を無効にする方法

  1. CentOS / RHEL 7 :kdump の設定方法

  2. CentOS / RHEL 5 :kdump の設定方法

  3. CentOS / RHEL 6:IPv6 を無効にする方法