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-clean(1M)

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

NAME

swa-clean: swa — remove files created by SWA

SYNOPSIS

swa clean {swcache|usercache|all} [-p] [-q [q[q]]] [-v[v]] [[-option] -?] [-x option=[value|-?]] [-X option_file]

DESCRIPTION

The swa clean command allows the user to remove software and files cached by Software Assistant (SWA). As SWA is used to report on systems and download software, objects are cached on disk for later use. There are two caches. The first cache is for catalog, inventory, and analysis information, and the second cache is for software downloaded from HP. The swa clean command allows the recapture of this disk space.

The swa clean commands are as follows:

swa clean swcache

Remove files containing software downloaded by swa get into the swcache directory. The swcache directory is specified by the swcache extended option. The directory is often one or more gigabytes in size.

swa clean usercache

Remove cached files that were created by swa report. These files are stored in the cache subdirectory of the directory specified by the user_dir extended option. Generally, the cache directory includes the inventories of systems and depots, the catalog of issues and recommended resolutions, and the results of the analysis. This directory is often a dozen or more megabytes in size.

swa clean all

Clean the usercache and the swcache directories.

Options

swa clean recognizes the following options:

-p

Runs this command in preview mode.

-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 clean recognizes the following -x (extended) options which are shown with their default values:

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

Usage: Basic

Applicable caches: swcache usercache all

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

Applicable caches: swcache usercache all

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

0

Only ERROR messages and the starting/ending BANNER messages.

1

Adds WARNING messages.

2

Adds NOTE messages.

3

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

4

Adds verbose INFO messages; this is the default.

5

Adds very verbose INFO messages.

-x preview=false

Usage: Basic

Applicable caches: swcache usercache all

Specifies if swa clean should be run in preview mode or not. If preview is set to false, do not run in preview mode. If preview is set to true, run this command in preview mode only (that is, complete the analysis phase and exit; no changes are committed to disk). Setting this option to true has the same effect as specifying -p on the command line.

-x swcache=/var/opt/swa/cache

Usage: Basic

Applicable caches: swcache all

This is the directory where SWA stores downloaded patches before putting them into a depot. The default location is only writable by root, so this directory needs to be changed for a non-root user to be able to download software. Opening up permissions on the default location is not recommended.

-x user_dir=~/.swa

Usage: Basic

Applicable caches: usercache all

This is 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

Applicable caches: swcache usercache all

Specifies the level of standard error verboseness:

0

Only ERROR messages and the starting/ending BANNER messages.

1

Adds WARNING messages.

2

Adds NOTE messages.

3

Adds INFO messages (informational messages preceded by the asterisk '*' 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.

RETURN VALUE

swa clean returns one of the following values:

0

Successful completion

1

Error

2

Warning

EXAMPLES

To display swa clean usage information:

swa clean -?

To display usage and list all swa clean extended options:

swa clean -x -?

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

swa clean -X ./myconfig

To remove all cached inventory, catalog, and analysis information in the default location:

swa clean usercache

To remove all cached downloaded software in the default location:

swa clean swcache

To preview the removal of all cached downloaded software in the default location:

swa clean swcache -p

To remove all cached inventory, catalog, analysis, and downloaded software in specified locations:

swa clean all -x user_dir=~/myusercache -x swcache=/my/cache

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.

SEE ALSO

swa(1M), swa-get(1M), swa-report(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.