Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Software Assistant Administration Guide: HP-UX 11i Systems > Appendix C SWA Manpages

swa-report(1M)

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

NAME

swa-report: swa — report software and security issues, and resolutions

SYNOPSIS

swa report [-a analyzer] [-r stdout_report_type] [-s inventory_source] [-q [q[q]]] [-v[v]] [[-option] -?] [-x option=[value|-?]] [-X option_file]

DESCRIPTION

The swa report command inventories and analyzes a host system or some types of depots against a catalog of HP software and known issues (security and other defects). HP-UX Software Assistant (SWA) then generates three results:

  • A comprehensive HTML report saved in a file

  • A text report printed to standard output (report types include "action", "issue", or "detail")

  • An analysis results file that the swa get command uses

Each of these results indicates the issues found and/or new software and fixes that Hewlett Packard recommends.

Note: The format of these results is subject to change in a subsequent release of SWA.

Security Considerations

The analysis that swa report performs relies on the integrity of the inventory to determine the appropriate patches to install on the system. It is important that all protocols used to transmit the inventory data are integrity protected and that the host used to generate the inventory data is accurately represented. For example, use of swlist for gathering an inventory of a remote system uses a clear-text, unauthenticated protocol that does not protect the integrity of the data. Using Secure Shell to gather an inventory of a remote system uses an integrity protected (and encrypted) protocol. Even when using Secure Shell, the analysis still relies on the source of the data (the remote host) to accurately represent the software contents installed on that system.

Options

swa report recognizes the following options:

-a analyzer

Specifies an analyzer to use. Each analyzer represents a different type of analysis that swa can perform. You may specify multiple -a options. The supported analyzers are as follows:

CRIT

patches that fix critical problems

PCW

patches with critical warnings

PW

patches with warnings (a superset of PCW)

QPK

latest quality pack

SEC

security bulletins that may apply

CHAIN=patchID[,patchID]*

include patch or recommended successor

PATCH=patchID[,patchID]*

include specific patch.

Note: Use of CHAIN is generally preferred.

If the -a option is not specified, the QPK, SEC, and PCW analyzers are used. See also the -x analyzers extended option.

-r stdout_report_type

Specifies the type of report to display to standard output. Legal values are as follows:

action

(Default) Summary of recommended actions

issue

Summary of identified issues

detail

Recommended actions with issue justification

html

Comprehensive report in HTML format

none

No report is generated on standard output

-s inventory_source

Specify one system or depot to be inventoried, or an existing local inventory file to be analyzed and reported on. If this option is not specified, the local system is inventoried, analyzed and reported on. Supports Secure Shell (recommended for remote connections) and swlist (legacy) protocols for gathering inventory information. See the extended option inventory_source for more details.

-q

The verbosity level is decreased by one for each instance -q is specified. (See also the -x verbosity option.)

-v

The verbosity level is increased by one for each instance -v is specified. (See also the -x verbosity option.)

-?

Displays general usage.

-option -?

Describes the legal values for this option. If option is -x, all possible extended options are listed for the specified major mode (swa command). If no major mode is given, all extended options are listed for all the major modes.

-x option=value

Sets the extended option to a value. See the Extended Options definitions below.

-x option=-?

Describes the legal values for this option.

-X option_file

Gets the extended options from option_file. For a description and examples of syntax for this file, see the /etc/opt/swa/swa.conf.template file.

Extended Options

The extended options may be specified in different ways: on the command line using the -x option, in an option file specified using the -X option, or in one of the configuration files /etc/opt/swa/swa.conf (system wide) or $HOME/.swa.conf (user-specific). The /etc/opt/swa/swa.conf.template file provides example syntax for a configuration or -X file.

If the same option is given in multiple locations, the following order is prioritized from highest to lowest:

  1. Options specified on the command line

  2. Options specified within an option file (-X option_file)

  3. Proxy environment variables (See the Environment Variable section.)

  4. Options specified within the $HOME/.swa.conf file

  5. Options specified within the /etc/opt/swa/swa.conf file

  6. Default value, specified in the descriptions of each option below in option_name=default_value format.

Note: If the same option or extended option is given multiple times in the same location, the last option takes effect. If the option has a single letter equivalent (for example, -v and -x verbosity) and both are used on the command line, the single letter option generally takes precedence. If the single letter option affects an extended option that takes a list of arguments, specifying the single letter option multiple times will append to the list.

swa report recognizes the following -x (extended) options, which are shown with their default values:

-x analysis_file=${user_dir}/cache/swa_analysis.xml

Usage: Basic

The file containing the raw analysis results, including a list of software that should be downloaded from Hewlett-Packard in order to address the issues found by the analysis. Use this option to save the results from a specific analysis, and later reuse those results in order to download the corresponding software from HP. If you do not use the default location when the analysis file is created (swa report creates this file), be sure to specify that location when the analysis file is later used (swa get uses this file).

Possible values include any absolute or relative path name with appropriate permissions.

The use of ${user_dir} at the beginning of this option value is substituted with the value of the user_dir option (which defaults to $HOME/.swa).

-x analyzers=QPK SEC PCW

Usage: Basic

Specifies a space-separated list (appropriately quoted for your shell if applicable) of analyzers to be used. Each analyzer represents a different type of analysis that swa can perform. The supported analyzers follow in two lists (generic and specific).

Generic analyzers:

CRIT

patches that fix critical problems

PCW

patches with critical warnings

PW

patches with warnings (a superset of PCW)

QPK

latest quality pack

SEC

security bulletins that may apply

Specific analyzers:

CHAIN={patchID[,patchID]*}

include patch or recommended successor

PATCH={patchID[,patchID]*}

include specific patch.

Note: Use of CHAIN is generally preferred.

Note: This option is equivalent to -a but is suitable for use within an extended options file (-X) or configuration file.

-x catalog_max_age=24

Usage: Intermediate

Specifies the age, in hours, of the locally-cached copy of the HP software catalog before a new local copy should be obtained. If the local file becomes too old (based on the timestamp in the file), SWA tries to obtain a copy of the catalog from the catalog_source location. It is possible that the remote catalog is also too old (as determined by the timestamp in the file). For example, suppose catalog_max_age=2 and catalog_source specifies a location that gets updated daily from HP's website. In this case, the downloaded catalog is used, but will be updated every time SWA checks the catalog's age.

Note: There are two special values, 0 and -1. The value of 0 signifies to always update the file. The value of -1 signifies to never update the file, regardless of age.

-x catalog=${user_dir}/cache/swa_catalog.xml

Usage: Intermediate

The file containing a locally-cached copy of the catalog of available HP software and published security bulletins.

Possible values include any absolute or relative path name with appropriate permissions.

The use of ${user_dir} at the beginning of this option value is substituted with the value of the user_dir option (which defaults to $HOME/.swa).

-x catalog_source=https://ftp.itrc.hp.com/wpsl/bin/doc.pl/

screen=wpslDownloadPatch/swa_catalog.xml.gz?PatchName= /export/patches/swa_catalog.xml.gz 

Usage: Intermediate

A space-separated list of URLs (appropriately quoted for your shell if applicable) that controls the remote location and service to obtain the remote HP software catalog. The catalog contains a list of all potential issues, relevant software product updates and patches that address many issues, along with descriptions of manual actions that address some issues. HP frequently updates this catalog as new issues become known and as new actions are recommended.

The following format is used to specify URLs:

service://[user:password@]hostname.domainname:port

Where service is one of the following methods for obtaining the remote catalog from HP:

https

Secure/authenticated HTTP

http

Unauthenticated HTTP

ftp

Unauthenticated FTP

Note: The following are alternative, though less-secure, unauthenticated paths to the standard HP catalog file:

http://ftp.itrc.hp.com/wpsl/bin/doc.pl/screen=wpslDownloadPatch/ swa_catalog.xml.gz?PatchName=/export/patches/swa_catalog.xml.gz

ftp://ftp.itrc.hp.com/export/patches/swa_catalog.xml.gz

-x crl_check=true

Usage: Advanced

When set to true, SWA will require the Certificate Revocation List (CRL) to be updated and checked for the trusted Certificate Authority (CA) certificate being used to validate the remote server.

In the unlikely event that the private certificate of the server pointed to by the catalog_source option is suspected of being compromised, its certificate will be revoked, and added to a list of revoked certificates by the CA. See the catalog_source option.

The CRL must be signed by the same certificate chain that signed the host certificate being checked. Checking the CRL requires regular downloads from the CA, which can lengthen the SWA run time. If you do not wish to validate a revocation list, set this to false.

-x crl_url=http://crl.verisign.com/RSASecureServer.crl

Usage: Advanced

The URL of the CRL. See the crl_check option for more information. If you are behind a proxy server, then you will need to configure the proxy information for the protocol being used to download the CRL.

-x download_cmd=

Usage: Intermediate

Specifies a command that can download a URL from the Internet. The command is enclosed in single quotes ('). This option is useful in cases where a system does not have a direct connection to the Internet, but can execute a command that can download a URL from the Internet (for example, by using a gateway machine).

Using this option overrides many options which are used by the internal SWA download functionality, including proxy and CRL configuration.

This command should take one option that is supplied by SWA (the URL of a file to download), and outputs that file to its standard output. If the actual command in your environment behaves differently, it can be wrapped by a shell script in order to provide the interface that SWA needs.

The command needs to support the protocol specified by the catalog_source option (default HTTPS) for catalog retrieval and FTP for patch retrieval. See the catalog_source option.

Note: Externally used commands are not necessarily supported by HP, but can give considerable flexibility for your environment. For example, some external commands can authenticate using Windows NT®-based domain passwords to a Microsoft® web proxy, which is not directly supported by SWA.

The following command is an example:

swa report -x download_cmd='ssh user@system curl'

This command uses SSH (see ssh(1)) to run the curl command on a gateway system. The curl command is an open source tool that ships with several Linux distributions. curl may be configured, either using a configuration file on the gateway system or by command-line parameters specified as part of the download_cmd option.

-x ftp_proxy=${proxy}

Usage: Advanced

Proxy host and port (with optional HTTP basic authentication username and password) for accessing content using the FTP protocol. No proxy information is specified by default.

The following format is used:

service://[user:password@]proxy-server:port

For example: ftp_proxy=http://web-proxy.mycompany.com:8088

The FTP protocol is used for patch download. Integrity of the patches is checked using MD5 secure hashes in the catalog, for which the HTTPS protocol is recommended. See the https_proxy option and the catalog_source option for details.

The use of ${proxy} for this option value is substituted with the value of the proxy option (which is not set by default).

-x html_report=${user_dir}/report/swa_report.html

Usage: Basic

The file containing the HTML-formatted report that is generated by the swa report command. This is a single file with internal hyperlinks. The HTML report may be printed to standard output using the stdout_report_type option.

The use of ${user_dir} at the beginning of this option value is substituted with the value of the user_dir option (which defaults to $HOME/.swa).

-x https_proxy=${proxy}

Usage: Advanced

Proxy host and port (with optional HTTP basic authentication username and password) for accessing content using the HTTPS protocol. No proxy information is specified by default.

The following format is used:

service://[user:password@]proxy-server:port

For example: https_proxy=http://web-proxy.mycompany.com:8088

If username and password are specified as authentication credentials to your proxy server, HTTP basic authentication is used, which is a clear-text protocol, (that is, your password may be visible to others on your network). Also, credentials specified on the command-line are visible to other local users, and access to credentials stored in extended option files are determined by their permissions. If your proxy server requires another type of authentication, see the -x download_cmd option.

The use of ${proxy} for this option value is substituted with the value of the proxy option (which is not set by default).

-x http_proxy=${proxy}

Usage: Advanced

Proxy host and port (with optional HTTP basic authentication username and password) for accessing content using the HTTP protocol. No proxy information is specified by default.

The following format is used:

service://[user:password@]proxy-server:port

For example: http_proxy=http://web-proxy.mycompany.com:8088

The HTTP protocol is the default protocol used to download certificate revocation lists. See the crl_url option for more details.

The use of ${proxy} for this option value is substituted with the value of the proxy option (which is not set by default).

-x ignore_file=${user_dir}/ignore

Usage: Basic

Files containing regular expressions, indicating which issues to ignore. Each issue is matched by a regular expression (see regexp(5)), and is ignored by the analysis. That is, whether or not the host or depot being analyzed have the identified issue, that issue will not appear on the report. In addition, software will not be selected for download to address the issue. The software may still be selected to address a different issue.

When a user first runs SWA, if this file does not exist, a template file is created, which contains instructions on how to use this file. Upon creation, if a ~/.spc_ignore file exists, it is translated into the SWA format and appended to the template.

The use of ${user_dir} at the beginning of this option value is substituted with the value of the user_dir option (which defaults to $HOME/.swa).

-x inventory_max_age=24

Usage: Intermediate

Specifies the age, in hours, of the cached copy of the inventory contents of a given system. If the inventory becomes too old (based on the timestamp stored in the file), SWA will inventory the host system/depot again.

Note: There are two special values, 0 and -1. The value of 0 signifies to always update the file. The value of -1 signifies to never update the file, regardless of age.

-x inventory_source=localhost

Usage: Basic

Note: This release supports only one system, depot (limited use cases), or inventory file for analysis per invocation of SWA. This option is useful for analyzing a remote system without installing SWA on that system.

Specify one of the following: a host system or depot to be inventoried, analyzed, and reported on; or an existing inventory file to be analyzed and reported on.

Specify source as a URL using one of the following formats:

hostname

System specification, uses unauthenticated swlist protocol to gather the host inventory.

[hostname:]full-path-to-depot

Depot specification, also uses swlist protocol (limited use cases).

ssh://[user@]hostname[:full-path-to-depot]

SSH specification to system or depot, uses SSH to contact host and local swlist of the system or depot.

The inventory information is cached for later access in a cache directory within the user_dir. Naming of the inventory files is based on the hostname and path-to-depot as specified (for example, using the fully qualified domain name of a host will be cached separately from using the node name, even for the same machine). Refresh of the cached inventory for each inventory_source is determined by the inventory_max_age option.

Note: This option is equivalent to -s but is suitable for use within an extended options file (-X) or configuration file.

[file://]full-path-to-inventory-file]

Inventory file specification, must be a local file.

If an argument is specified in such a way that it could be interpreted as either a system name or a file name, it will be assumed to be a system name. For example, if foo is the argument, then it will be interpreted as a system named foo. Alternatively, if ./foo is the argument, then it will be interpreted as an inventory file named foo residing in the current directory.

If an inventory file name is not specified, the inventory information is cached for later access in a cache directory within the user_dir. Naming of these cached inventory files is based on the hostname and path-to-depot as specified (e.g. using the fully qualified domain name of a host will be cached separately from using the node name, even for the same machine). Refresh of the cached inventory for each inventory_source is determined by the inventory_max_age option.

The following option specifications are examples:

System specification:

-x inventory_source=ssh://user@host.example.com

Depot specification:

-x inventory_source=ssh://host.example.com/var/spool/sw

Inventory file specification:

-x inventory_source=file:///home/user/local_inventory.xml

Note: This option is equivalent to -s but is suitable for use within an extended options file (-X) or configuration file.

-x logfile=/var/opt/swa/swa.log

Usage: Basic

This is the path to the log file for this command. Each time SWA is run, this file will grow larger. This can be changed, for example, to a month-specific location for easier archiving, off-host backup, and rotation.

-x log_verbosity=4

Usage: Basic

Specifies the level of message verbosity in the log file (See also -x verbosity). Legal values are:

0

Only ERROR messages and the starting and ending BANNER messages.

1

Adds WARNING messages.

2

Adds NOTE messages.

3

Adds INFO messages (informational messages preceded by the '*' character).

4

Adds verbose INFO messages; this is the default.

5

Adds very verbose INFO messages.

-x proxy=

Usage: Basic

Proxy host and port (with optional HTTP basic authentication username and password) for accessing content using the relevant protocol. No proxy information is specified by default.

The following format is used:

service://[user:password@]proxy-server:port

For example: proxy=http://web-proxy.mycompany.com:8088

If username and password are specified as authentication credentials to your proxy server, HTTP basic authentication is used, which is a clear-text protocol, (that is, your password may be visible to others on your network). Also, credentials specified on the command-line are visible to other local users, and access to credentials stored in extended option files are determined by their permissions. If your proxy server requires another type of authentication, see the -x download_cmd option. This option is used as the default for the other proxy settings.

The HTTPS protocol is used for catalog download, the HTTP protocol is used to download the CRL, and the FTP protocol is used for patch download. The proxy= option controls the default for all three proxies. See the https_proxy option, the http_proxy option, and the ftp_proxy option for more details.

-x report_when_no_issues=true

Usage: Intermediate

Controls whether SWA will produce a report to standard output when there are no issues and/or actions. This is useful, for example, in a cron job where you want email sent to you only if there is an issue found.

true

A standard output report is always produced.

false

A standard output report is only produced if there are issues and/or actions.

Hint: To check for error status, use the exit code of the command and check the logfile for details.

-x ssh_options=

Usage: Intermediate

Options to be passed to ssh. Multiple options may, be included as a space-delimited list. For example, if you are using SWA in a cronjob, you may want to specify '-o BatchMode=yes' to return immediately upon failure, rather than prompting for a password.

See ssh_config(5) for additional options.

-x stdout_report_type=action

Usage: Basic

Type of report to display on standard output. This is useful for controlling what type of output you would like to see. Legal values are:

action

Summary of recommended actions

issue

Summary of identified issues

detail

Recommended actions with issue justification

html

Comprehensive HTML report

none

No report

-x user_dir=~/.swa

Usage: Basic

The directory where SWA stores catalog, inventory, analysis, ignore, and report files. The default location is a subdirectory (.swa) of the user's home directory. This can be changed, for example, to allow archival of previous interim artifacts in a date-specific directory or off-host. Several other options default to a directory relative to this directory, so changing this option allows all of those locations to stay in synch relative to a common root.

-x verbosity=3

Usage: Basic

Specifies the level of standard error verboseness:

0

Only ERROR messages and the starting and ending BANNER messages.

1

Adds WARNING messages.

2

Adds NOTE messages.

3

Adds INFO messages (informational messages preceded by the '*' character); this is the default.

4

Adds verbose INFO messages.

5

Adds very verbose INFO messages.

Note: The -v option is equivalent to increasing verbosity by 1 (for example, from 3 to 4) and the -q option is equivalent to decreasing verbosity by 1. The -v and -q options can be used more than once.

EXTERNAL INFLUENCES

Environment Variables

For compatibility with other applications (including security_patch_check), several environment variables can be used to configure how SWA connects to the Internet to retrieve catalogs, certificate revocation lists, and software. These environment variables include ftp_proxy, http_proxy, and https_proxy.

These environment variables have the same effect as the corresponding extended options of the same names. The Extended Options section describes the usage and meaning of each option and the behavior if the same option is specified in multiple places.

The proxy extended option cannot be specified as an environment variable, but may be a useful alternative if all protocols use the same proxy server at your site.

The TMPDIR environment variable is also honored for local operations, if set. If this value is not set, the default of /var/opt/swa/tmp is used. This directory does not allow write operations for non-privileged users, so TMPDIR must be set by non-root users if a temporary directory is required for that operation. An example operation that uses this directory is unsharing of patch files. For older-style patches which do not honor TMPDIR, SWA rewrites the shar file so that TMPDIR will be honored before unpacking the patch.

RETURN VALUE

swa report returns the following values:

0

Success

1

Error

2

Warning

EXAMPLES

To display swa report usage information:

swa report -?

To display usage and list all swa report extended options:

swa report -x -?

To run swa report using the options specified in the file ./myconfig:

swa report -X ./myconfig

To inventory the local system, analyze it against an HP-supplied catalog (of known software and issues) for newer Quality Pack patch bundles, security issues, and critical patch warnings, and then generate a default standard output "action" report:

swa report

To create a report for security issues (SEC) for a remote system inventory gathered with Secure Shell, and running ssh in batchmode to avoid being prompted for user input:

swa report -a SEC -s ssh://user@remotesystem  \ -x ssh_options='-o batchmode=yes'

To create a detailed report for remotesystem, limited in scope to Quality Pack patch bundle analysis (QPK) and patches with critical warnings (PCW). This example uses the swlist networking protocol, which is not integrity protected.

swa report -a QPK -a PCW -s remotesystem -r detail

To do the same task as the previous example, using the extended option equivalents (which can be specified on the command line, in a user or system configuration file, or in an extended options file):

swa report -x analyzers='QPK PCW' \ -x inventory_source=remotesystem -x stdout_report_type=detail

To generate a report and place the analysis results in the ~/firstanalysis.xml file (for later use by swa get):

swa report -x analysis_file=~/firstanalysis.xml

To generate a report, updating the catalog of HP software if it is more than 48 hours old:

swa report -x catalog_max_age=48

To generate a report using a specified catalog of HP software without updating that catalog:

swa report -x catalog=~/mycatalog.xml -x catalog_max_age=-1

To generate a report always updating the catalog of HP software:

swa report -x catalog_max_age=0

AUTHOR

swa was developed by HP.

FILES

/etc/opt/swa/swa.conf

System-wide Software Assistant configuration file.

/etc/opt/swa/swa.conf.template

Template file that documents each -x option.

$HOME/.swa.conf

Per-user Software Assistant configuration file.

/var/opt/swa/swa.log

Default log file location for root users. For users without write permissions to the default log location, a swa.log file is created under the directory specified by the -x user_dir extended option.

ignore

Lists issue IDs to be ignored (for example, they are completed or not applicable). Supports comments and regular expressions. See regexp(5).

SEE ALSO

swa(1M), swa-clean(1M), swa-get(1M), swa-step(1M).

HP-UX Software Assistant System Administration Guide and HP-UX Software Assistant Release Notes at http://docs.hp.com.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2007–2008 Hewlett-Packard Development Company, L.P.