Red Hat Access: Red Hat Support Tool

Updated -

Note: redhat-support-tool and redhat-support-lib-python have been deprecated in RHEL 8 and will not be shipped in RHEL 9 onwards
See "Red Hat Support Tool (RHST) Deprecation Guide" and "Red Hat Secure FTP - User Guide " which outline equivalent commands that can be used to replace many of the commonly used redhat-support-tool functions.

Upgrade to the latest version of redhat-support-tool as versions prior to 0.13.0 will stop working after 11 July 2022 owing to the deprecation of the underlying infrastructure.
Refer Why does Red Hat Access Support and Knowledge commands of redhat-support-tool fail ? for more details.

Benefits

Red Hat's Customer Experience and Engagement (CEE) is pleased to announce the availability of Red Hat Access in Red Hat Enterprise Linux. With Red Hat Access, delivered through the Red Hat Support Tool, customers can find help, get answers, and utilize diagnostic services using exclusive Red Hat knowledge, resources, and functionality, all within a Linux terminal.

Subscribers who install this tool (which is supported till the maintenance support phase of RHEL) will enjoy the following Red Hat Access services from the Red Hat Enterprise Linux terminal:

  • Create, manage, update, and attach files to Red Hat support cases
  • Conveniently access exclusive Red Hat knowledge and solutions
  • Search error codes, messages, etc., and view related knowledge from the Red Hat Customer Portal
  • Use diagnostic services to analyze log files
  • Easily extract backtraces from kernel core files

TOC

Installation

The Red Hat Support Tool for Red Hat Enterprise Linux is installed by running the following command.

yum install redhat-support-tool

Usage

The Red Hat Support Tool, redhat-support-tool, is both a shell and a single-execution program. The Red Hat Support Tool does not require a graphical interface as it is entirely text based. It can be run over SSH or from any terminal.

The program, by default, will launch into the shell mode where the commands (e.g., opencase, btextract, search, etc.) can be called. All commands that are available in the shell mode are also available in single-execution mode (e.g., redhat-support-tool btextract /path/to/vmcore).

There are some useful convenience features available in the shell mode such as tab command completion and using the '!' to call programs in the parent shell.

Red Hat Support Tool in Shell Mode

Red Hat Support Tool Interactive Mode

Red Hat Support Tool in Non-Interactive Mode

Red Hat Support Tool Non-Interactive Mode

Videos

Videos that demonstrate both the usage and features of the Red Hat Support Tool are listed below.

  • Red Hat Support Tool First Use First Use: installation, searching the knowledgebase, and navigating articles.

  • Red Hat Support Tool Configuration Options Configuration Options: including proxy configuration, and interactive versus non-interactive mode.

  • Red Hat Support Tool - Diagnostics Services Diagnostic Services: advanced diagnostic services with commands like 'diagnose', 'analyze', and 'btextract'. Note: diagnose file is no longer supported

  • Red Hat Support Tool - Support Engagement Support Engagement: engage Red Hat Support via the command line, including how to attach files like SOS reports to cases, how to open cases, and check on a case's status.

Configuration

The Red Hat Support Tool will self configure when it is launched the first time. Minimally, the Red Hat Support Tool needs a Red Hat login so that it can securely (via HTTPS) use Red Hat Access services. Users have the option to either persist their login information in a configuration file ($HOME/.redhat-support-tool/redhat-support-tool.conf) or supply it each time the tool is invoked.

All of the Red Hat Support Tool's configuration options can all be viewed by executing the command config --help. These configuration options are set by typing the config <option name> <option value> command. A picture demonstrating this is here.

Importantly, the Red Hat Support Tool has full proxy support for sites that require a proxy server access to the Internet. The tool can also be configured to use a proxy server with a password if necessary.

Configuration options can also be set globally by the root user so that they are available for all users on a system. A simple use case where a system-wide configuration setting makes sense is proxy information. In this use case, a root user will launch the Red Hat Support Tool and type config --global proxy_url http://proxy.example.com. The proxy information will be saved by the tool to /etc/redhat-support-tool.conf. Ordinary users of the Red Hat Support Tool on that system will inherit this proxy information into their configurations and will not need to supply this information. A picture demonstrating this scenario is here.

Automatic Configuration at First Launch

Automatic Configuration at First Launch

All Available Configuration Options

A Listing of All Available Configuration Options
Note: Options shown in the screenshots may have changed in the newer builds of the RHST tool

Example: Globally Set a Site's Proxy Server

Example: Globally Set a Site's Proxy Server

Firewall Configuration

In case you're behind a firewall, you might want to allow access to the following:

HTTP method
Host: api.access.redhat.com, rh-case-attachments.redhat.com, sso.redhat.com
Protocols: HTTP, HTTPS,
Ports: 80, 443
HTTP Methods: GET, POST, PUT, DELETE

FTP Method
Host: sftp.access.redhat.com
Protocols: SFTP
Ports: 22 (default), 80(needs to be configured)

Help

The Red Hat Support Tool provides help for each command. The help command with no options will list all available commands and a brief description of each. Additional help is available on each specific command by typing help <command> as shown here

Help on all Available Commands

All Command Help

Help on a Specific Command

Help on an Specific Command

Red Hat Access: Knowledge

The Red Hat Support Tool allows subscribers to both search for and view the same knowledge content found in the Red Hat Customer Portal
in a terminal and in the same manner that man pages are normally viewed. The screenshot below demonstrates what the Red Hat Customer Portal Knowledge Article numbered 66281 looks like when viewed in the Red Hat Support Tool.

View Solution

Search for Knowledge

A keyword search of the Knowledgebase is performed with the search command. Users can enter error codes, lines from a log file, or any set of keywords to produce a relevant query. The tool will search the Red Hat Knowledgebase and present the results in a list with the most relevant results first. Pagination through the remaining results is possible when the result set is greater than what can be rendered in a terminal window and is demonstrated below.

The screenshot below demonstrates a keyword search, selection of a Knowledge Article, and the subsequent menu where it is possible to view specific sections or to view the document in its entirety.

Keyword Search

View Knowledge

The Red Hat Support Tool supports a variety of mechanisms to view knowledge. It is possible to directly access knowledge if the identifier is known through the kb command. The following example demonstrates how to view knowledge non-interactively. With this approach it is possible to pipe the output to other programs like grep and more for advanced use cases.

KB Command Non-interactive

Red Hat Access: Support

The Red Hat Support Tool allows subscribers to easily view, update, attach files to support cases. The following screenshots demonstrate how to manage support cases with the tool.

The screenshot below demonstrates the use of the listcases command with an optional filter to show closed support cases. There are other filter options (e.g., filter by case group and keyword) which can be seen by viewing help on the listcases command (i.e., listcases --help).

List all Support Cases in an Account

List all Support Cases in an Account

From the list of available support cases, make a selection to either manage or view the various attributes of a support case. The screenshot below displays a subsequent menu where it is possible to update the support case's state, attach a file, add a comment, view the discussion, and various other actions.

Support Case Menu Actions

Support Case Menu Actions

The Red Hat Support Tool makes it easy to attach a file to a support case. It is possible to attach a file through the case menu (shown below) or via the addattachment command.

Attach a File to a Support Case

Attach a File to a Support Case

There are various ways to manage a support case, including non-interactive. The example below demonstrates how to close a support case non-interactively.

Close a Support Case

Close a Support Case

Open a Support Case and Attach a SoS Report

Support-case creation with the Red Hat Support Tool is a recommended way to engage Red Hat support services. When a support case is created using the tool, the tool will give the option to optionally collect an SoS report or attach any file that may be relevant to the issue. The tool simplifies the process of attaching these files because it automates the work of collection and attachment to the support case.

The example below demonstrates how to use the Red Hat Support Tool to create a support case and automatically attach an SoS report. In the example below, the product and version are set as arguments to the opencase command. These arguments were set for brevity and are not necessary. If they are not supplied as arguments the tool will present a pick list of products and associated versions.

Open a support case and attach a SoS report

The screenshot below demonstrates that an SoS report was successfully attached to the newly created support case in the Red Hat Customer Portal's support case view.
Attachment in customer portal

Red Hat Access: Diagnose

The Red Hat Support tool has a variety of commands available to assist with problem determination. These commands are btextract, diagnose, and analyze.

Simplified Backtrace Extraction from a Kernel Core File

Kernel backtraces provide extremely useful information for the problem determination of a kernel crash. If a system is properly configured to collect a kernel core file, then the Red Hat Support tool can be used to easily extract a backtrace and either perform on-site diagnostics or open a support case so that a Red Hat support engineer can assist with resolution. When engagement with Red Hat support is required, it is often quicker to open a support case with the actual backtrace as opposed to attaching a kernel core file because core files are often very large.

To perform an analysis of a kernel core file, the associated debug symbols for that specific kernel build are required. The Red Hat Support Tool will automatically inspect the supplied kernel core file and download the appropriate debug symbols from the Red Hat Customer Portal. The tool will then present the user with some common crash commands, the option to supply custom commands, the option to diagnose the output, and the option to open a support case with a backtrace attached. The screenshot below demonstrates how to perform analysis on a kernel core file.

Kernel Core File Analysis

To perform an onsite analysis of the kernel core file, simply select Diagnose from the menu as shown below.

Diagnose a backtrace

Kernel debug symbols are, by default, unpacked into /var/lib/redhat-support-tool/debugkernels. The tool provides two additional commands for managing the debug symbols cached in /var, which are rmkerneldebug and listkerneldebugs. These commands are shown below.

List and Remove Kernel Debug Symbols

Diagnose an Error Code, or a String

In addition to standard keyword-based searching (i.e., the search command), the Red Hat Support Tool allows users to leverage Red Hat Access Diagnostic services. Red Hat Access Diagnostic services services go above and beyond traditional keyword based searching and perform additional analysis to correlate the most relevant knowledge to the given input.

The diagnose command in the Red Hat Support Tool is the gateway to Red Hat Access Diagnostic services. It accepts a command line text. Please note the diagnose command no longer accepts file inputs. Refer to the Release Notes.

Analyze a Tomcat, JBoss, or Python Log File

The Red Hat Support Tool has specialized filtering for the analysis of logs from both Java and Python programs. The analyze command will accept the path to a log file as input and will look for interesting problem symptoms within the file. The tool will then present these symptoms to the user in a pick list so that they can be both viewed and diagnosed individually. This can produce more relevant results from Red Hat Access Diagnostic services as opposed to sending up an entire log file.

The screenshot below demonstrates the analyze command processing a JBoss server log file. The Red Hat Support Tool will process the log file and present interesting problem symptoms for the user to review in a pick list.

Analyze Command

Comments