IBM Support

Installing and Updating sos report on RHEL7, 8 and 9 for IBM Power Servers: Importance and Procedures

How To


Summary

Linux plays a pivotal role in cloud infrastructure, encompassing private, public, hybrid, and multi-cloud environments. It also stands at the forefront of artificial intelligence (AI), automation, data, and security. Additionally, Linux operates universally across various systems, including IBM Power Servers (ppc64le), Mainframes (os390), x86, embedded systems, ARM architecture, consoles, mobile devices, and others. Given this extensive use, it's crucial to quickly troubleshoot any hardware or software issues affecting Linux nodes, as they can significantly impact the performance of running applications, services, and platforms.

This document serves as a comprehensive guide for managing `sos report` on Red Hat Enterprise Linux (RHEL)7, 8 and 9 running on IBM Power Servers. An `sos report` is an essential tool for diagnosing and troubleshooting hardware and software-related issues, providing detailed insights into the system's configuration and operational state. Keeping the 'sos report' and `IBM Power Systems service and productivity tools` up to date can offer the advantage of speeding up hardware and software troubleshooting, which is crucial for clients when they need it the most.

Objective

  • `sos report` and `IBM Power Systems service and productivity tools` are critical for system diagnostic and troubleshooting in Linux environments.
  • For Red Hat Enterprise Linux (RHEL) 7, 8 and 9 users on IBM Power Servers, understanding how to install and update the `sos report` is essential.
  • This document provides a comprehensive guide to effectively manage `sos report`.

Steps

On IBM Power Servers, the `sos report` serves as an essential tool for gathering key log data. It collects essential information, including configuration details, system specifics such as Vital Product Data (VPD), system firmware, I/O microcode, and diagnostic data, which are crucial for troubleshooting hardware and software-related issues on Red Hat Enterprise Linux servers.

Note: Collecting Vital Product Data (VPD) on IBM Power Servers running RHEL depends on the version of the`sos report`and the versions of `IBM Power Systems service and productivity tools` (e.g., lsvpdlibvpd). The `lsvpd` package includes the lsvpd, lscfg, and lsmcode commands. Together with a scanning program named `vpdupdate`, these commands compile a comprehensive hardware inventory of the system. This includes a list of all internal parts, part numbers, locations, serial numbers, feature codes (FC), Custom Card Identification Numbers (CCIN), I/O microcodes, system firmware, etc. Such detailed information is essential for remote engineers to create an action plan and dispatch field engineers for part replacement or system diagnostics.
In RHEL 8 and 9, the `sos report` function is analogous to the `sosreport` command found in RHEL 7 and its earlier versions. Essentially, while the core functionality of the `sos report` tool remains consistent between RHEL 7 and RHEL 8, the differences in system architecture, package management, and updated system features lead to some variations in how the tool is installed, managed, and how it reports on system diagnostics.
The `sos report` is consistently updated with new versions, incorporating vital bug fixes and improvements in data collection to facilitate the comprehensive gathering of data required by remote support engineers to tackle complex hardware and software issues. With the release of version 4.0, the 'sos' binary has replaced the previous 'sosreport' binary. This update marks the transition of the `sos` utility to Python 3, as support for Python 2 has been discontinued.

Prerequisites:

  • Access to a RHEL system registered with RHSM and with internet access.
  • FTP server or USB/DVD drive (for transferring files to the air-gapped system).
  • Basic familiarity with Linux command line interface.

Part 1: Installing and Downloading SOS Report Package for Systems Registered with RHSM

  1. On an Internet-Connected System:

    • Ensure that the system is registered with RHSM and has internet access.
    • Open a terminal and execute following commands: for RHEL 7 or, the equivalent command for RHEL 8 or 9.
      BaseOS repo
      sudo subscription-manager repos --enable rhel-8-for-ppc64le-baseos-rpms
      Supplementary AppStream repo
      sudo subscription-manager repos --enable rhel-8-for-ppc64le-appstream-rpms
    • Verify whether the SOS report is installed on your system and check for any issues with the installation.
      [root@sos ~]# rpm -qa sos
      sos-4.6.0-2.el8.noarch
      [root@sos ~]# rpm -V sos
      
    • Installing and Updating `sosreport` on RHEL 7
      sudo yum install sos
      sudo yum update sos
    • Install and Update the `sos report` on RHEL 8 and 9
      sudo dnf install sos
      sudo dnf update sos
    • Download the `sos report` package:
      RHEL8 and 9
      sudo dnf download sos --resolve
      RHEL7
      sudo yum download sos --resolve
      (This command downloads the sos package and its dependencies).
    • Transfer the downloaded RPM files to a FTP server or USB/DVD drive.
  • On the Disconnected System:

    • The public General Availability (GA) version of the `sos report` can be used in production and is available for download via Red Hat Product Errata. In Red Hat Customer Portal search for `sos`, select the latest Product Errata:
      https://access.redhat.com/errata-search/?q=sos&p=1&sort=portal_publication_date+desc&rows=10
      image-20231124222956-1
    • Ensure you are logged in with your Red Hat subscription account and then navigate to 'Update Packages'. Make sure to select the appropriate `sos report` version that corresponds with the Red Hat Enterprise Linux (RHEL) version you are using (such as RHEL7, 8, or 9), and download the `sos` RPM. If the download button is not visible, verify that your subscription permits you to download packages. In the example below, we are downloading the `sos` RPM for RHEL8. The 'noarch' version is compatible with IBM Power Servers, as well as other architectures such as x86, IBM z Systems, and more.
      image-20231124225106-3
    • Transfer the RPM file to the system either via an FTP server or from a USB/DVD drive. For additional details on how to set up yum/dnf repository for locally-mounted DVD, refer to section 3.1.3, “Customizing the Linux operating system” on page 78 in the IBM PowerVC Version 2.0 Redbook.
    • Install the package by using the local RPM install command:
      RHEL8 and 9
      sudo dnf install /path/to/rpm
      REHL7
      sudo yum localinstall /path/to/rpm
      (Replace /path/to/rpm with the actual path to the RPM file).
    • The RPM command can be utilized to install and update the `sos report` package on any version of RHEL.
      To install:
      rpm -ivh /path/to/sos-<version>.noarch.rpm
      To install and update:
      rpm -Uvh /path/to/sos-<version>.noarch.rpm
      (Replace /path/to/ with the actual path to the `sos` RPM file).

Part 2: Installing SOS Report on an Air-Gapped System

  1. Preparing the Package Repository:

    • On a system with internet access, create a local repository containing the `sos` package and its dependencies. This can be done by mirroring the required repositories or manually downloading the necessary RPMs.
  2. Transferring the Repository:

    • Copy the entire local repository to a FTP server or USB drive or other removable media.
  3. Installing from the Local or cloned Repository :

    • Connect the USB/DVD drive to the air-gapped system.
    • Mount the USB/DVD drive and add the repository to the YUM configuration. This typically involves creating a .repo file in /etc/yum.repos.d/ pointing to the repository on the USB/DVD drive or FTP server.
    • Install the SOS report by using YUM:
      RHEL8 and 9
      sudo dnf install sos
      RHEL7
      sudo yum install sos
Part 3: Uninstalling SOS Report on Red Hat Enterprise Linux (RHEL)
To uninstall the SOS Report tool on Red Hat Enterprise Linux (RHEL) 8 and 9, you will typically use the DNF package manager or RPM command. Here are the steps:
  • Before uninstalling, it's a good practice to verify that the `sos report` tool is indeed installed on your system. Execute the following command:
    sudo dnf list installed sos
    (This command will list the SOS package along with its version if it is installed.)
    or use RPM command on
    any version of RHEL (7,8,9):
    [root@sos ~]# rpm -qa sos
    sos-4.6.0-2.el8.noarch
    
  • To remove the `sos report` package on any version of RHEL, use the following command:
    for i in $(rpm -qa | grep sos); do rpm -e --nodeps ${i}; done
    Note: We will use the RPM command to uninstall only the sos report tool, leaving its dependencies intact. Using `dnf remove` on RHEL 8 and 9 would uninstall the `sos report` along with all its dependencies. Keep in mind that removing dependencies could impact other packages installed on your RHEL server, potentially leading to system instability or functionality issues.
     
Part 4: How can you run a newer version of SOS on older RHEL releases?

Important note: For IBM Power Servers running RHEL 7.9, the latest available SOS package is version sos-3.9. However, this version is missing several important plugins, such as key configuration details, system specifics like Vital Product Data (VPD), system firmware, I/O microcode, and diagnostic tools including nvidia-smi, nvme, arcconf, opal-elog, hbacmd, ipmi and more. These plugins are crucial for effectively troubleshooting hardware and software-related issues on Red Hat Enterprise Linux servers. The lack of these plugins in sos-3.9 often requires a secondary request for log information, potentially prolonging the resolution of cases by hours or even days.
 
If your Red Hat server is version-locked, for instance at 7.9, and the latest SOS package isn't available from the older repository, it's important to note that recent versions or changes to the SOS report might not always be backported to older RHEL releases due to various reasons. Nevertheless, it's possible to use the most recent SOS package on any version of RHEL by employing the `support-tools` container image through `podman`.  This `support-tools` container image is regularly updated and maintained with the latest SOS package and is accessible from the registry.redhat.io container image registry:
  • To use `podman` and pull the support-tools container image, first log in to the registry at registry.redhat.io
    [root@sos ~]# podman login registry.redhat.io
    Username: borislav.ivanov.stoymirski
    Password:
    Login Succeeded!
  • To successfully install and execute the support-tools container image on IBM Power Servers running RHEL 7.9, and to efficiently collect an sos report archive from the host within the container image, the following command should be run:
    podman container runlabel RUN registry.redhat.io/rhel8/support-tools
    
    (This command will install and RUN the SOS package on RHEL 7.9)
    Trying to pull registry.redhat.io/rhel8/support-tools:latest...
    Getting image source signatures
    Checking if image destination supports signatures
    Copying blob a7dde6f953b3 done
    Copying blob 068f2e6b47b2 done
    Copying config e8aa68d02c done
    Writing manifest to image destination
    Storing signatures
    
    
    Note:
    If a message, "Error: creating container storage: the container name "support-tools" is already in use by 828bd4de6a68cc4dbc1cc41c43cd2cba9920f84d29373496fa4f1aa357faf400. You have to remove that container to be able to reuse that name: that name is already in use

    Error: `/proc/self/exe run -it --name support-tools --privileged --ipc=host --net=host --pid=host -e HOST=/host -e NAME=support-tools -e IMAGE=registry.redhat.io/rhel8/support-tools:latest -v /run:/run -v /var/log:/var/log -v /etc/machine-id:/etc/machine-id -v /etc/localtime:/etc/localtime -v /:/host registry.redhat.io/rhel8/support-tools:latest` failed: exit status 125" , is displayed on the terminal after running the 'podman' command, type `sudo podman rm support-tools` to remove the `support-tools` container and rerun the 'podman' command to avoid issues with `sos report`.
    [root@Sos ~]# sudo podman rm support-tools
    support-tools
    
    To verify that you are connected and operating within a support-tools container, you can view environment variable by running:
    [root@sos /]# env | grep -i image
    IMAGE=registry.redhat.io/rhel8/support-tools:latest
    

    Next, generate a new `sosreport` archive by running the `sos report` command:
    [root@sos /]# sos report
    
    sosreport (version 4.6.0)
    
    This command will collect diagnostic and configuration information from
    this Red Hat Enterprise Linux system and installed applications.
    
    An archive containing the collected information will be generated in
    /host/var/tmp/sos.s_2own11 and may be provided to a Red Hat support
    representative.
    
    Any information provided to Red Hat will be treated in accordance with
    the published support policies at:
    
            Distribution Website : https://www.redhat.com/
            Commercial Support   : https://access.redhat.com/
    
    Creating compressed archive...
    
    Your sosreport has been generated and saved in:
            /host/var/tmp/sosreport-sos-podmansos-2023-11-25-kyarksu.tar.xz
    
     Size   21.77MiB
     Owner  root
     sha256 7e93464ca5246991cbe3cf098d8ef3ba3d018c133152c31bf81a6e32308b1e4b
    
    Please send this file to your support representative.
    
    Press ENTER to continue, or CTRL+C to quit.
    When instructed to “enter the case ID that you are generating this report for []”, type: <IBM or Red Hat case number >
    A file called "sosreport-nodename-currentdate.tar.xz" is created in “/host/var/tmp/sosreport-nodename-currentdate.tar.xz“
    • Exit the `support-tools` container by using `Ctrl+C` in the Terminal or detach from the container without stopping it with  `Ctrl+P` followed by ` Ctrl+Q`.
    • To see all containers, including those that have exited or stopped, use and copy the <Container ID>:
      [root@sos ~]# podman ps -a
      CONTAINER ID  IMAGE                                          COMMAND        CREATED         STATUS                    PORTS       NAMES
      145fb3e77c4f  registry.redhat.io/rhel8/support-tools:latest  /usr/bin/bash  10 minutes ago  Exited (0) 9 minutes ago              support-tools
      
    • Use podman cp to Copy the File: The podman cp command allows you to copy files between a container and the local filesystem. To copy a file from a container to the host, use:
      podman cp <container_id>:/path/in/container /path/on/host
      For instance, if our <container_id> is 145fb3e77c4f, the following command can be used to copy the `sosreport` archive to the target host:
      [root@sos ~]# podman cp 145fb3e77c4f:/host/var/tmp/sosreport-sos-podmansos-2023-11-25-kyarksu.tar.xz /root/sosreport-sos-podmansos-2023-11-25-kyarksu.tar.xz
    • To return to a container that is still running, you can use the podman attach command if you want to attach to a container's STDIN, STDOUT, and STDERR, or podman exec to start a new process inside a running container. Here's how you can do it:

      1. Using podman attach:

        • If you want to reattach to the container's main process (for instance, if it's a shell), use:
          podman attach <container_id_or_name>
          (This command will reconnect you to the terminal session you detached from if the container is still running.)
      2. Using podman exec:

        • If you want to execute a new command or open a new shell inside a running container, use:
          podman exec -it <container_id_or_name> /bin/bash
          
        • For instance, if our <container_id> is 145fb3e77c4f, the following command can be used to execute a new command or open a new shell:
          [root@sos ~]# podman ps -a
          CONTAINER ID  IMAGE                                          COMMAND        CREATED         STATUS                    PORTS       NAMES
          145fb3e77c4f  registry.redhat.io/rhel8/support-tools:latest  /usr/bin/bash  10 minutes ago  Exited (0) 9 minutes ago              support-tools
          
          [root@sos ~]# podman exec -it 145fb3e77c4f /bin/bash
        • Here, /bin/bash is an example. It opens a bash shell inside the container. You can replace /bin/bash with any command you wish to run inside the container.
        • The -it flag is used for interactive processes, like a shell.
    Part 4: Transfer the log data to existing IBM case via Ecurep URL:
Note: The steps might vary slightly depending on the specific RHEL version and system configuration. Always refer to the official Red Hat documentation for the most accurate and up-to-date information.

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"TI000BK","label":"Power System E1080 Server (9080-HEX)"},"ARM Category":[{"code":"a8m3p000000F940AAC","label":"Data Collection (Must Gather)-\u003EFrom Linux OS"},{"code":"a8m3p000000PCPiAAO","label":"I\/O-\u003ELinux Adapters and Disks"},{"code":"a8m3p000000PCPEAA4","label":"Operating System (OS)-\u003ELinux OS"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"},{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSMI4EA","label":"IBM Power E1050 (9043-MRX)"},"ARM Category":[{"code":"a8m3p000000F940AAC","label":"Data Collection (Must Gather)-\u003EFrom Linux OS"},{"code":"a8m3p000000PCPiAAO","label":"I\/O-\u003ELinux Adapters and Disks"},{"code":"a8m3p000000PCPEAA4","label":"Operating System (OS)-\u003ELinux OS"}],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"},{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SST50ER","label":"IBM Power S1022s (9105-22B)"},"ARM Category":[{"code":"a8m3p000000F940AAC","label":"Data Collection (Must Gather)-\u003EFrom Linux OS"},{"code":"a8m3p000000PCPiAAO","label":"I\/O-\u003ELinux Adapters and Disks"},{"code":"a8m3p000000PCPEAA4","label":"Operating System (OS)-\u003ELinux OS"}],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]

Document Information

Modified date:
29 November 2023

UID

ibm17082727