2024年10月Linux系统如何安装和使用supportconfig工具

发布时间:

  ⑴supportconfig作为Linux系统shell编写的工具,其功能是非常强大的,但还是有很多人对supportconfig工具不了解,不知如何使用supportconfig工具,下面小编就简单的给大家介绍下Linux安装使用supportconfig的方法。

  ⑵一、supportconfig的安装

  ⑶可以通过yast进行安装,也可以通过zypper命令进行安装,安装命令如下:

  ⑷直接使用源进行安装

  ⑸#zypper install supportutils

  ⑹也可以将rpm包下载下来使用yast进行安装或者在yast的管理界面里查找安装

  ⑺#yast install supportutils-xxx.rpm

  ⑻注:根据系统的版本不同,包名也可能是supportconfig 。

  ⑼安装完成后可以使用rpm -ql supportutils 查看包中具体包含的文件信息,如下:

  ⑽# rpm -ql supportutils

  ⑾/etc/schealth.conf

  ⑿/etc/supportconfig.conf

  ⒀/sbin/chkbin

  ⒁/sbin/supportconfig

  ⒂/usr/bin/schealth

  ⒃/usr/share/man/man/supportconfig.conf..gz

  ⒄/usr/share/man/man/chkbin..gz

  ⒅/usr/share/man/man/supportconfig..gz

  ⒆注:上面的结果是在 suse sp企业版上的测试的结果,在opensuse 上目录结构会略有不同,其上使用的是新版本的supportconfig。

  ⒇二、supportconfig用法

  ⒈以下是supportconfig的帮助输出

  ⒉# supportconfig -h

  ⒊=============================================================================

  ⒋Support Utilities - Supportconfig

  ⒌Script Version: .-

  ⒍Script Date:

  ⒎=============================================================================

  ⒏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》 Contact 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 pany 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 report files, just use files in that

  Ⅸdirectory.

  Ⅹ-g Use gzip instead of the default bzip pression.

  ㈠-i 《keyword list》

  ㈡Include keywords. A ma separated list of feature keywords that specify

  ㈢which features to include. Use -F to see 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, ylogs

  ㈦-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, do 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 time

  to plete

  -x 《keyword list》

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

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

  -y Only gather the minimum ylog files.

  Use Ctrl- to try and skip a function that is hanging.

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

  This tool will 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:

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

  Please submit bug fixes or ments via:

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

  Support Utilities - Supportconfig

  Script Version: .-

  Script Date:

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

  默认supportconfig或supportconfig -A执行后会将收集后的结果打包为一个nts_主机名_日期.tbz 文件,同时会生成一个以该文件名加.md后缀的文件。