Holy Supportconfig File

Share
Share

Let’s talk about Supportutils tool? Sure thing, why not!

As a Technical Support Engineer in SUSE, I rely heavily on Supportutils tool which generates a file with all the configurations and logs of the system, the Holy Supportconfig File. Frankly, my job would be much more difficult without this little eminent tool and it took me a while to get to know how to properly use it, let’s have a look.

WHERE

First thing first, where do I find the tool? Supportutils package and YaST Module “yast2-support” are shipped with our SLES OSs:

root:~ # zypper se supportutils yast2-support
Loading repository data...
Reading installed packages...

S  | Name             | Summary                             | Type
--+----------------------------+-------------------------------------+-----------
i  | supportutils     | Support Troubleshooting Tools       | package
   | supportutils     | Support Troubleshooting Tools       | srcpackage
i  | yast2-support    | Configuration of nts support tools  | package

WHAT

Official documentation about the usage of this tool and YaST Module can be found here.

Supportutils is a tool to collect all the info of a system into a compressed file called Supportconfig File.

WHY

Needless to say, the Holy Supportconfig File is necessary for the Support Team to troubleshoot the customers/partners problems, it is usually needed when there is a PROBLEM!

The first thing that a Technical Support Engineer would ask when summoned for troubleshooting an issue on any of the SUSE Products is, indeed, a Supportconfig File.

HOW

Second thing second, check the manual! All the options and information are listed there: the tool can generate the Supportconfig File with the default settings, it can generate the file and upload it automatically to the Support Team FTP server, it can add contact information to the tarball file like an e-mail address or telephone number, etc., etc.

I usually ask our customers to run the tool with option “-l”:

root:~ # supportconfig -l

Gathering system information
 Data Directory: /var/log/nts_hostname_170416_1021

 Basic Server Health Check... Done
 RPM Database... Done
 Basic Environment... Done
 System Modules... Done
 Memory Details... Done
 Disk I/O... Done
 B-tree File System... Skipped
 YaST Files... Done
 File System List... Skipped
 Auditing... Done
 Crash Info... Done
 NTP... Done
 PROC... Done
 Boot Files... Done
 [..]
Creating Tar Ball

==[ DONE ]===================================================================
 Log file tar ball: /var/log/nts_hostname_170416_1021.tbz
 Log file size: 2.9M
 Log file md5sum: 1229965fe933dbbec446df5aa6359acb
=============================================================================

With this option, the tool generates a compressed file in “/var/log” with all the configurations files, logs and even rotated logs. The file can then be attached to the Service Request via SUSE Customer Center or uploaded to the Support Team FTP server.

Especially when the file is uploaded to the FTP server, it can be very useful to add the Service Request number to the file name, the option “-r” allows to do it:

root:~ # supportconfig -r 12345678901

Gathering system information
 Data Directory: /var/log/nts_SR12345678901_hostname_170416_1032

 Basic Server Health Check... Done
 RPM Database... Done
 Basic Environment... Done
 System Modules... Done
 [..]
 System Logs... Done

Creating Tar Ball

==[ DONE ]===================================================================
 Log file tar ball: /var/log/nts_SR12345678901_hostname_170416_1032.tbz
 Log file size: 902K
 Log file md5sum: b01c8b81424a419f1c4ce357d9101559
=============================================================================

The tool has also the possibility to upload automatically the tarball file to the Support Team FTP server, very comfortable:

root:~ # supportconfig -u

Gathering system information
 Data Directory: /var/log/nts_hostname_170416_1038_97825489-dc63-4406-bdd4-8dec628513ff

 Basic Server Health Check... Done
 RPM Database... Done
 Basic Environment... Done
 [..]
Creating Tar Ball

==[ DONE ]===================================================================
 Log file tar ball: /var/log/nts_hostname_170416_1038_97825489-dc63-4406-bdd4-8dec628513ff.tbz
 Log file size: 1.2M
 Log file md5sum: 529ddd0ed99fb7bad2caa2dc7597a114
=============================================================================


Uploading Tar Ball
-----------------------------------------------------------------------------

curl -#T "/var/log/nts_hostname_170416_1038_97825489-dc63-4406-bdd4-8dec628513ff.tbz.md5" "ftp://anonymous@ftp.novell.com/incoming/nts_hostname_170416_1038_97825489-dc63-4406-bdd4-8dec628513ff.tbz.md5"

######################################################################## 100.0%

curl -#T "/var/log/nts_hostname_170416_1038_97825489-dc63-4406-bdd4-8dec628513ff.tbz" "ftp://anonymous@ftp.novell.com/incoming/nts_hostname_170416_1038_97825489-dc63-4406-bdd4-8dec628513ff.tbz"

######################################################################## 100.0%

I could continue for ages and go through all the options but I’d like to focus on one in particular, “-C” option. Supportutils has a bunch of default settings and variables which, usually, don’t need to be touched; for example, the details for the FTP server are stored in a variable:

VAR_OPTION_UPLOAD_TARGET='ftp://anonymous@ftp.novell.com/incoming'

All those variables are stored in “/etc/supportconfig.conf” but the file is not automatically generated, the command with option “-C” creates the file and, then, we are able to modify it as needed:

root:~ # less /etc/supportconfig.conf
/etc/supportconfig.conf: No such file or directory
laura:~ # supportconfig -C


[..]

Overwriting /etc/supportconfig.conf with default options.

root:~ # cat /etc/supportconfig.conf
####################################
# Default Options
####################################
OPTION_AFP=1
OPTION_APPARMOR=1
OPTION_AUDIT=1
OPTION_AUTOFS=1

Now that the configuration file is created, there are many custom settings that can be implemented depending on the various need to use this tool; one of the most important customization is to exclude certain options to be used during collecting the data from the system, for example, my system is not using Docker and Multipath, i can speed up the process via excluding these two options. I modify the file “/etc/supportconfig.conf” and i change the following entries from:

OPTION_DOCKER=1

OPTION_MPIO=1

To:

OPTION_DOCKER=0

OPTION_MPIO=0

Then I run the tool again, but now it will not collect anything related to Multipath and Docker:

root:~ # supportconfig -l

Gathering system information
 Data Directory: /var/log/nts_hostname_170416_1115

Basic Server Health Check... Done
 RPM Database... Done
 Basic Environment... Done
 [..]
 Docker... Excluded
 CRON... Done
 [..]
 Multipathing... Excluded

If the systems are locked down in a secure environment, probably there is no access to the external network so Supportutils can be customized to use a different FTP, SCP, HTTPS or HTTP server by changing the variable in “/etc/supportconfig.conf” related to the upload target:

VAR_OPTION_UPLOAD_TARGET='ftp://anonymous@ftp.example.com/incoming'

Then run the command again:

root:~ # supportconfig -u

With “-u”, the tool will pick the destination target, where to upload the Supportconfig File, from the variable above specified in the configuration file.

The command above does the same job of:

root:~ # supportconfig -U ftp://anonymous@ftp.example.com/incoming

As I mentioned previously, I could continue for ages showing all the amazing features and customization of this tool but, for now, let me close with just: Thank You, Holy Supportconfig File.

Share
(Visited 14 times, 1 visits today)

Leave a Reply

Your email address will not be published. Required fields are marked *

No comments yet

Avatar photo
15,870 views