Installation and usage of Supportconfig in Linux

Source: Internet
Author: User
Tags keyword list tainted

As a result of work, usually need SUSE engineers do second-line technical support, in addition to often submit kdump analysis results to SUSE engineers positioning root cause. In the absence of kdump generation, the often used instruction is supportconfig collect system information. Its collection basically covers the kernel, modules, systems, services, and so on almost all the information we can think of, in addition to a simple health check report, in addition to the SUSE Enterprise version, the same can be used on the openSUSE. This article in conjunction with the present network uses the scene to make a simple generalization to the Supportconfig command.

First, the installation of Supportconfig

It can be installed through yast, or it can be installed through the Zypper command as follows:

Install directly using the source

The code is as follows Copy Code
#zypper Install Supportutils
You can also download the RPM package to install using YaST or find it in the YaST admin interface
#yast Install supportutils-xxx.rpm

Note: Depending on the version of the system, the package name may also be supportconfig.

After the installation is complete, you can use RPM-QL supportutils to view the file information specifically contained in the package as follows:

The code is as follows Copy Code
# RPM-QL Supportutils
/etc/schealth.conf
/etc/supportconfig.conf
/sbin/chkbin
/sbin/supportconfig
/usr/bin/schealth
/usr/share/man/man5/supportconfig.conf.5.gz
/usr/share/man/man8/chkbin.8.gz
/usr/share/man/man8/supportconfig.8.gz

Note: The results above are the result of a test on the SUSE11 SP1 Enterprise Edition, where the directory structure is slightly different on the openSUSE 13, with a new version of Supportconfig.

Second, Supportconfig usage

The following is the Supportconfig help output

The code is as follows Copy Code
# supportconfig-h


=============================================================================


Support Utilities-supportconfig


Script version:2.25-197


Script date:2010 04 02


=============================================================================


usage:supportconfig [option [option ...]]


-H This screen


-A activates all Supportconfig functions with additional logging and full


RPM verification.


-B <string> Custom tar ball file name element


-C Creates a new default/etc/supportconfig.conf


-D use defaults; Ignore/etc/supportconfig.conf


-e <string> Contacts email address


-F Display available supportconfig feature keywords (case-sensitive) used


With-i And-x


-G <gpg_uid> the GPG recipient ' s user ID used to encrypt the Supportconfig tarball


-H <number> Limit number of included HA Policy engine files


-I <number> Default log file line count


-L Create A full file listing from '/'


-M <string> Contact Terminal ID


-N <string> Contact name


-O <string> Contact company Name


-P <string> Contact phone number


Q-Run in silent mode


-R <path> Log output directory


-S <number> Limit number of included SAR files


-T <seconds> Binary execution timeout


-U <uri string> Sets upload target URL and initiates an upload, supported


Services include:ftp, SCP, HTTP, HTTPS


-M <string> Contact store ID


-X <number> Max system logs line count


-A Upload the tar ball to the specified alternate target Var_option_upload_alt


-B Screen Buffer mode


-D Exclude Detailed disk info and scans


-e Search root file system for edirectory instances; -L implied. Be patient.


-F from directory. Don ' t collect the files, just use files in that


Directory.


-G use GZIP instead of the default bzip2 compression.


-I <keyword list>


Include keywords. A Comma separated list of feature keywords that specify


which features to include. Use-f to a list of valid keywords.


-L gathers additional rotated logs


-M only gather a minimum amount of info:basic env, basic health, hardware,


RPM, Messages, y2logs


-O Toggle listed features on or off


-P Disable All plugins


-Q ADD A UUID to the tar ball filename to ensure uniqueness


-R <srnum>


Includes the Novell digit service request number when uploading


The tar ball to Novell


-S Include full SLP service lists


-T Target directory. Just Save log files here, does not create tarball.


-U Upload the tar ball to the specified var_option_upload_target.


-V performs an rpm-v for each installed RPM Note:this takes a long


To complete


-X <keyword list>


Exclude keywords. A Comma separated list of feature keywords that specify


which features to exclude. Use-f to a list of valid keywords.


-Y only gather the minimum y2log files.


Use ctrl-to try and skip a function, which is hanging.


-----------------------------------------------------------------------------


Note:


This tool would create a tar ball in The/var/log directory. Please attach


The log file tar ball to your open Service. Request at the following URL:


Https://secure-support.novell.com/eService_enu


If you are cannot attach the tar ball to the SR, then email it to the engineer.


Please submit the bug fixes or comments via:


Http://en.opensuse.org/Supportutils#Reporting_Bugs


=============================================================================


Support Utilities-supportconfig


Script version:2.25-197


Script date:2010 04 02


=============================================================================


After the default supportconfig or supportconfig-a is executed, the collected results are packaged as a nts_ hostname _ date. tbz file, and a file with the. MD5 suffix of the file is generated.

Three, Supportconfig common examples

1, supportconfig-a collect all the logs

The code is as follows Copy Code

# Supportconfig


=============================================================================


Support Utilities-supportconfig


Script version:2.25-290


Script date:2011 07 14


=============================================================================


Gathering System Information


Data Directory:/var/log/nts_361way.com_140825_1504


Basic Server Health Check ... Done


RPM Database ... Done


Basic environment ... Done


Basic Health ... Done


System Modules ... Done


Memory Details ... Done


Disk I/o ... Done


YaST Files ... Done


Auditing ... Done


Crash Info ... Done


Ntp... Done


PROC ... Done


Boot Files ... Done


Slert ... Skipped


Updates ... Done


Smt... Skipped


Novell edirectory ... Please wait ... Skipped


Novell LUM ... Skipped


Novell NCP ... Skipped


Novell NSS ... Skipped


Novell DFS ... Skipped


Novell SMS ... Skipped


Novell NCS ... Skipped


Novell AFP ... Skipped


Novell CIFS ... Skipped


Novell Imanager ... Skipped


HA Cluster ... Skipped


OCFS2 ... Skipped


Drbd... Skipped


Pam... Done


Ldap... Done


CIMOM ... Done


Open Files ... Done


Environment ... Done


ETC ... Done


Sysconfig ... Done


SYSFS ... Done


System daemons ... Done


Cron... Done


At ..... Done


UDEV ... Done


Lvm... Please wait ... Base Detail Done


Evms... Skipped


Software Raid ... Done


Multipathing ... Done


Networking ... Done


Web... Done


InfiniBand ... Done


Dns... Done


Dhcp... Done


Slp... Done


Ssh... Done


ISCSI ... Done


Samba... Done


Nfs... Done


AUTOFS ... Done


SAR Files ... Done


AppArmor ... Done


Xen... Done


Kvm... Done


X... Done


Printing ... Done


SMART disks ... Excluded


Hardware ... Please wait ... Done


File System List ... Skipped


Supportability Analysis ... Please wait ... Done


System Logs ... Done


Creating Tar Ball


==[done]===================================================================


Log file tar ball:/var/log/nts_361way.com_140825_1504.tbz


Log file size:4.0m


Log file Md5sum:484b111cda54ca04419facd82a1da7d7


Please attach the ' log file tar ball to your open Service ' Request at the


Following URL:


Https://secure-support.novell.com/eService_enu


can also upload the tar ball to ftp.novell.com/incoming, or just use


Supportconfig-ur <srnum&gt, to upload the tar ball automatically.


If you are cannot attach the tar ball to the SR, then email it to the engineer.


=============================================================================


Other common uses:

Gather the information you need with the smallest option
# supportconfig-m
Include additional contact information in the output
# supportconfig-e Tux@example.org-n "Tux Penguin"-O "Penguin Inc" ...
To view the complete list of features
# supportconfig-f
Collect only the usage of a module, such as the LVM phase information
# supportconfig-i LVM
The function of-X is exactly the opposite of-I, excluding a module from collecting
# supportconfig-x LVM
Use the-u URL to upload the results of the collection to the server, direct services have FTP, SCP, HTTP, HTTPS, such as:
# supportconfig-a-U http://www.361way.com/files/

Refer to the Official Supportconfig options section.

System Health Report collected by Supportconfig:

The code is as follows Copy Code
# supportconfig-a


# Cd/var/log


# tar JXVF nts_361way.com_140825_1504.tbz


# more Basic-health-report.txt


#==[Command]======================================#


#/usr/bin/schealth-q


######################################################################


Supportconfig Health Check Tool v1.00-5


Date CHECKED:09/12/14 04:40:37


######################################################################


Health Check Files [Green]


Processes waiting for Run Queue [Green]


Kernel taint Status [Red]


Kernel tainted:64 > 0


CPU utilization [Green]


Interrupts per Second [Green]


Context switches per Second [Green]


Free Memory and Disk swapping [Green]


Used Disk space [Green]


uninterruptible processes [Green]


Zombie processes [Green]


######################################################################


Status:red Flag


Checked:/var/log/nts_361way.com_140825_1504/basic-health-check.txt


:/var/log/nts_361way.com_140825_1504/basic-health-report.txt


######################################################################


In the report above, we found that the kernel tainted state is red, which is judged by cat/proc/sys/kernel/tainted, if the value is not 0, then the kernel is contaminated, the value is different, can refer to the/usr/src/ Linux/documentation/sysctl/kernel file (the exact value is different, the meaning of the representative is also different). The 64 red is due to the loading of a non-system official or non-open-source module (unsupported modules loaded).

Iv. supportconfig configuration Files

The default profile for Supportconfig is/etc/supportconfig.conf, and the default content is as follows:

The code is as follows Copy Code
# cat/etc/supportconfig.conf


####################################


# Default Options


####################################


Option_afp=1


Option_apparmor=1


Option_audit=1


Option_autofs=1


Option_boot=1


Option_chkconfig=1


Option_cifs=1


Option_cimom=1


Option_crash=1


Option_cron=1


Option_dfs=1


Option_dhcp=1


Option_disk=1


Option_dns=1


Option_edir=1


Option_env=1


Option_etc=1


Option_evms=1


Option_ha=1


Option_hcreport=1


Option_ib=1


Option_iscsi=1


Option_ldap=1


Option_lum=1


Option_lvm=1


Option_mem=1


Option_mod=1


Option_mpio=1


Option_ncp=1


Option_ncs=1


Option_net=1


Option_nfs=1


Option_nss=1


Option_ntp=1


Option_ocfs2=1


Option_ofiles=1


Option_pam=1


Option_print=1


Option_proc=1


Option_sam=1


Option_sar=1


Option_slert=1


Option_slp=1


Option_smart=0


Option_smb=1


Option_sms=1


Option_smt=1


Option_sraid=1


Option_ssh=1


Option_sysconfig=1


Option_sysfs=1


Option_udev=1


Option_up=1


Option_upd=1


Option_web=1


Option_x=1


Option_xen=1


Add_option_edir=0


Add_option_fslist=0


Add_option_logs=0


Add_option_mindisk=0


Add_option_minyast=0


Add_option_rpmv=0


Add_option_slp=0


var_option_bin_timeout_sec=300


Var_option_contact_company= ""


Var_option_contact_email= ""


Var_option_contact_name= ""


Var_option_contact_phone= ""


Var_option_contact_storeid= ""


Var_option_contact_terminalid= ""


Var_option_custom_arch= ""


Var_option_gpg_uid= ""


var_option_line_count=500


Var_option_log_dirs= "/var/log/tmp"


var_option_msg_maxsize=500000


var_option_pengine_files_limit=250


Var_option_sar_files_limit=30


Var_option_sbm=0


Var_option_silent=0


Var_option_unique_file=0


var_option_upload_alt= ' Https://secure-www.novell.com/upload?appname=supportconfig&file={tarball} '


var_option_upload_target= ' ftp://ftp.novell.com/incoming '


The configuration file lists the module information that is collected by default, company information, mail, telephone, and uploaded server directory.

V. Summary of Supportconfig

Supportconfig is a very powerful tool written using the shell, which can be viewed through vim/sbin/supportconfig. At the same time, because of the versatility of Linux commands, we can even easily modify them and migrate them to other Linux distributions. But obviously this is not necessary, because there is a more open source tool Sosreport and its role is similar, and its applicability is more strong, followed by a separate article to do a summary.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.