swverify(8)swverify(8)NAMEswverify - verify software products
SYNOPSISswverify [-d| [-F] [-v] [-C session_file] [-f software_file] [-S ses‐
sion_file] [-t target_file] [-x option=value] [-X option_file]
[software_selections] [ target_selections]
STANDARDS
Interfaces documented on this reference page conform to industry stan‐
dards as follows:
POSIX 1387.2, XDSA
Refer to the standards(5) reference page for more information about
industry standards and associated tags.
DESCRIPTION
The swverify command verifies the software_selections at one or more
target_selections (e.g. root filesystems). When verifying installed
software, swverify checks software states, dependency relationships,
file existence and integrity, in addition to executing vendor-supplied
verification scripts.
The swverify command also verifies software_selections at one or more
target depots. For target depots, swverify performs all of the checks
listed above, but does not execute verification scripts.
NOTE: swverify does support operations on a tape depot.
The swverify command also supports these features:
· Verifies whether installed or configured software is compati‐
ble with the hosts on which that software is installed.
· Verifies that all dependencies (prerequisites, corequisites,
exrequisites) are being met (for installed software) or can
be met (for available software).
· Executes vendor-specific verify scripts that check if the
software products is correctly configured.
· Executes vendor-specific fix scripts that correct and report
specific problems.
· Reports missing files, check all file attributes (ignoring
volatile files). These attributes include permissions, file
types, size, checksum, mtime, link source and major/minor
attributes.
Options
swverify supports the following options:
-d (Optional) Operate on a depot rather than
installed software.
-F Runs vendor-specific fix scripts to correct and
report problems on installed software. The fix
script can create missing directories, correct
file modifications (mode, owner, group, major,
and minor), and recreate symbolic links.
-r (Optional) Operate on an alternate root rather
than /. Verify scripts are not run when verify‐
ing software in an alternate root directory. Use
of -r is optional.
-v Turns on verbose output to stdout. (The swverify
logfile is not affected by this option.) Verbose
output is enabled by default; see the verbose
option below.
-C session_file
Save the current options and operands to ses‐
sion_file. You can enter a relative or absolute
path with the file name. The default directory
for session files is $HOME/.sw/sessions/. You
can recall a session file with the -S option.
-f software_file
Read the list of software_selections from soft‐
ware_file instead of (or in addition to) the com‐
mand line.
-S session_file
Execute swverify based on the options and oper‐
ands saved from a previous session, as defined in
session_file. You can save session information
to a file with the -C option.
-t target_file Read the list of target_selections from tar‐
get_file instead of (or in addition to) the com‐
mand line.
-x option=value
Set the session option to value and override the
default value (or a value in an alternate
options_file specified with the -X option). Mul‐
tiple -x options can be specified.
-X option_file Read the session options and behaviors from
options_file.
Operands
Most SWMGR commands support two types of operands: followed by These
operands are separated by the "" (at) character. This syntax implies
that the command operates on "software selections at targets".
Software Selections
The swverify command supports the following syntax for each soft‐
ware_selection:
bundle[.product[.subproduct][.fileset]][,version]
product[.subproduct][.fileset][,version]
· The = (equals) relational operator lets you specify
selections with the following shell wildcard and pattern-
matching notations:
[ ], *, ?
· Bundles and subproducts are recursive. Bundles can con‐
tain other bundles and subproducts can contain other sub‐
products.
· The * software specification selects all products. Use
this specification with caution.
The version component has the form:
[,r <op> revision][,a <op> arch][,v <op> vendor]
[,c <op> category][,q=qualifier][,l=location]
[,fr <op> revision][,fa <op> arch]
· location applies only to installed software and refers to
software installed to a location other than the default
product directory.
· fr and fa apply only to filesets.
· The <op> (relational operator) component can be of the
form:
==, >=, <=, <, >, or !=
which performs individual comparisons on dot-separated
fields.
For example, r>=B.10.00 chooses all revisions greater
than or equal to B.10.00. The system compares each dot-
separated field to find matches.
· The = (equals) relational operator lets you specify
selections with the shell wildcard and pattern-matching
notations:
[ ], *, ?, !
For example, the expression r=1[01].* returns any revi‐
sion in version 10 or version 11.
· All version components are repeatable within a single
specification (e.g. r>=A.12, r<A.20). If multiple com‐
ponents are used, the selection must match all compo‐
nents.
· Fully qualified software specs include the r=, a=, and v=
version components even if they contain empty strings.
For installed software, l= is also included.
· No space or tab characters are allowed in a software
selection.
· The software can take the place of the version component.
It has the form:
[instance_id]
within the context of an exported catalog, where is an
integer that distinguishes versions of products and bun‐
dles with the same tag.
Target Selections
The swverify command supports the following syntax for each tar‐
get_selection. The : (colon) is required if both a host and
directory are specified.
[host][:][/directory]
EXTERNAL INFLUENCES
Default Options
In addition to the standard options, several SWMGR behaviors and policy
options can be changed by editing the default values found in:
/var/adm/sw/defaults the system-wide default values.
$HOME/.swdefaults the user-specific default values.
Values must be specified in the defaults file using this syntax:
[command_name.]option=value
The optional prefix denotes one of the SWMGR commands. Using the prefix
limits the change in the default value to that command. If you leave
the prefix off, the change applies to all commands.
You can also override default values from the command line with the -x
or -X options:
The following section lists all of the keywords supported by the swver‐
ify command. If a default value exists, it is listed after the "=". The
commands that this option applies to are also specified.
agent_auto_exit=true
Causes the target agent to automatically exit after
Execute phase, or after a failed Analysis phase. This
enhances network reliability and performance. The
default is true means the target agent automatically
exits when appropriate. If set to false, the target
agent will not exit until the controller ends the ses‐
sion.
agent_timeout_minutes=10000
Causes a target agent to exit if it has been inactive
for the specified time. This can be used to make tar‐
get agents more quickly detect lost network connec‐
tions since RPC can take as long as 130 minutes to
detect a lost connection. The recommended value is the
longest period of inactivity expected in your environ‐
ment. For command line invocation, a value between 10
minutes and 60 minutes is suitable. The default of
10000 is slightly less than 7 days.
allow_incompatible=false
Requires that the software products which are being
installed be "compatible" with the target selections.
(All of the target selections must match the list of
supported systems defined for each selected product.)
If set to true, target compatibility is not enforced.
allow_multiple_versions=false
Prevents the installation or configuration of another,
independent version of a product when a version
already is installed or configured at the target.
If set to true, another version of an existing product
can be installed into a new location, or can be con‐
figured in its new location. Multiple versions can
only be installed if a product is locatable. Multiple
configured versions will not work unless the product
supports it.
autoselect_dependencies=true
Controls the automatic selection of prerequisite,
corequisite, and exrequisite software that is not
explicitly selected by the user. When set to true,
the requisite software is automatically selected for
configuration. When set to false, requisite software
which is not explicitly selected is not automatically
selected for configuration.
check_contents=true
Causes swverify to verify the time stamp, size, and
checksum attributes of files. If set to false, these
attributes are not verified.
check_permissions=true
Causes swverify to verify the mode, owner, UID, group,
and GID attributes of installed files. If set to
false, these attributes are not verified.
check_requisites=true
Causes swverify to verify that the prerequisite,
corequisite, and exrequisite dependencies of the soft‐
ware selections are being met. If set to false, these
checks are not performed.
check_scripts=true
Causes swverify to run the fileset/product verify
scripts for installed software. If set to false,
these scripts are not executed.
check_volatile=false
Causes swverify to not verify those files marked as
volatile (i.e. can be changed). If set to true,
volatile files are also checked (for installed soft‐
ware).
controller_source=
Specifies the location of a depot for the controller
to access to resolve selections. Setting this option
can reduce network traffic between the controller and
the target. Use the target selection syntax to specify
the location:
[host][:][path]
This option has no effect on which sources the target
uses.
distribution_target_directory=/var/spool/sw
Defines the default distribution directory of the tar‐
get depot. The target_selection operand overrides
this default.
enforce_dependencies=true
Requires that all dependencies specified by the soft‐
ware_selections be resolved either in the specified
source, or at the target_selections themselves.
If set to false, dependencies will still be checked,
but not enforced. Corequisite dependencies, if not
enforced, may keep the selected software from working
properly. Prerequisite or exrequisite dependencies, if
not enforced, may cause the installation or configura‐
tion to fail.
enforce_locatable=true
(Currently, swverify recognizes this option, but the
option has no associated behavior. See swin‐
stall(1m)orsd(5) for more information.) Controls the
handling of errors when relocating a non-relocatable
fileset. If true, an error is generated when an
attempt is made to relocate a non-relocatable fielset.
If false, an attempt is made to relocate the fileset
in any case.
fix=false If true, runs vendor-specific scripts to correct and
report problems on installed software. Fix scripts can
create missing directories, correct file modifica‐
tions, (mode, owner, group, major, minor), and recre‐
ate symbolic links. If false, fix scripts are not run.
installed_software_catalog=/var/adm/sw/products
Specifies the installed software catalog. This
extended option, along with the installed_software
path attribute, defines the logical installed_software
object upon which swverify is operating. This extended
option is resolved relative to the PATHNAME_CHARAC‐
TER_STRING portion of the targets operand. Allows mul‐
tiple logical insstalled_software objects to share the
PATHNAME_CHARACTER_STRING where the software is
installed.
logfile=/var/adm/sw/sw<command>.log
Defines the default log file for each SWMGR command.
(The agent log files are always located relative to
the target depot or target root, e.g.
/var/spool/sw/swagent.log and /var/adm/sw/swa‐
gent.log.)
loglevel=1
Controls the log level for the events logged to the
command logfile, the target agent logfile, and the
source agent logfile. This information is in addition
to the detail controlled by the logdetail option. See
logdetail, above, and the sd(5) manual page (by typing
man 5 sd) for more information. A value of
0 provides no information to the logfile.
1 enables verbose logging to the logfiles.
2 enables very verbose logging to the logfiles.
log_msgid=0
Controls the log level for the events logged to the
command log file, the target agent log file, and the
source agent log file by prepending identification
numbers to log file messages:
0 No such identifiers are prepended (default).
1 Applies to ERROR messages only.
2 Applies to ERROR and WARNING messages.
3 Applies to ERROR, WARNING, and NOTE messages.
4 Applies to ERROR, WARNING, NOTE, and certain other
log file messages.
mount_all_filesystems=true
By default, the SWMGR commands attempt to mount all
filesystems in the /etc/fstab file at the beginning of
the analysis phase, to ensure that all listed filesys‐
tems are mounted before proceeding. This policy helps
to ensure that files are not loaded into a directory
that may be below a future mount point, and that the
expected files are available for a remove or verify
operation.
If set to false, the mount operation is not attempted,
and no check of the current mounts is performed.
rpc_binding_info=ncacn_ip_tcp:[2121] ncadg_ip_udp:[2121]
Defines the protocol sequence(s) and endpoint(s) on
which the daemon listens and which the other commands
use to contact the daemon. If the connection fails
for one protocol sequence, the next is attempted.
SWMGR supports both the tcp (ncacn_ip_tcp:[2121]) and
udp (ncadg_ip_udp:[2121]) protocol sequence on most
platforms. See the sd(5) man page by typing man 5 sd
for more information.
rpc_timeout=5
Relative length of the communications timeout. This
is a value in the range from 0 to 9 and is interpreted
by the DCE RPC. Higher values mean longer times; you
may need a higher value for a slow or busy network.
Lower values will give faster recognition on attempts
to contact hosts that are not up, or are not running
swagentd. Each value is approximately twice as long
as the preceding value. A value of 5 is about 30 sec‐
onds for the ncadg_ip_udp protocol sequence. This
option may not have any noticeable impact when using
the ncacn_ip_tcp protocol sequence.
select_local=true
If no target_selections are specified, select the
default target_directory of the local host as the tar‐
get_selection for the command.
software= Defines the default software_selections. There is no
supplied default. If there is more than one software
selection, they must be separated by spaces. Software
is usually specified in a software input file, or as
operands on the command line.
targets= Defines the default target_selections. There is no
supplied default (see select_local above). If there
is more than one target selection, they must be sepa‐
rated by spaces. Targets can be specified in a target
input file or as operands on the command line.
verbose=1 Controls the verbosity of a non-interactive command's
output:
0 disables output to stdout. (Error and warning
messages are always written to stderr).
1 enables verbose messaging to stdout.
2 for swpackage and swmodify, enables very verbose
messaging to stdout.
The -v option overrides this default if it is set to
0.
Session File
Each invocation of the swverify command defines a verify session. The
invocation options, source information, software selections, and target
hosts are saved before the installation or copy task actually com‐
mences. This lets you re-execute the command even if the session ends
before proper completion.
Each session is saved to the file $HOME/.sw/sessions/swverify.last.
This file is overwritten by each invocation of swverify.
You can also save session information to a specific file by executing
swverify with the -C session__file option.
A session file uses the same syntax as the defaults files. You can
specify an absolute path for the session file. If you do not specify a
directory, the default location for a session file is $HOME/.sw/ses‐
sions/.
To re-execute a session file, specify the session file as the argument
for the -S session__file option of swverify.
Note that when you re-execute a session file, the values in the session
file take precedence over values in the system defaults file. Like‐
wise, any command line options or parameters that you specify when you
invoke swverify take precedence over the values in the session file.
Environment Variables
SWMGR programs that execute control scripts set environment variables
for use by the control scripts.
The environment variable that affects the swverify command is:
LANG Determines the language in which messages are dis‐
played. If LANG is not specified or is set to the
empty string, a default value of C is used. See the
lang(5) man page by typing man 5 sd for more informa‐
tion.
NOTE: The language in which the SWMGR agent and daemon
log messages are displayed is set by the system con‐
figuration variable script, /etc/rc.config.d/LANG.
For example, /etc/rc.config.d/LANG, must be set to
LANG=ja_JP.SJIS or LANG=ja_JP.eucJP to make the agent
and daemon log messages display in Japanese.
LC_ALL Determines the locale to be used to override any val‐
ues for locale categories specified by the settings of
LANG or any environment variables beginning with LC_.
LC_CTYPE Determines the interpretation of sequences of bytes of
text data as characters (e.g., single-versus multibyte
characters in values for vendor-defined attributes).
LC_MESSAGES
Determines the language in which messages should be
written.
LC_TIME Determines the format of dates (create_date and
mod_date) when displayed by swlist. Used by all util‐
ities when displaying dates and times in stdout, log‐
ging.
TZ Determines the time zone for use when displaying dates
and times.
Environment variables that affect scripts:
SW_CATALOG
Holds the path to the Installed Products Database (IPD),
relative to the path in the SW_ROOT_DIRECTORY environment
variable. Note that you can specify a path for the IPD
using the installed_software_catalog default option.
SW_CONTROL_DIRECTORY
Defines the current directory of the script being exe‐
cuted, either a temporary catalog directory, or a direc‐
tory within in the Installed Products Database (IPD).
This variable tells scripts where other control scripts
for the software are located (e.g. subscripts).
SW_CONTROL_TAG
Holds the tag name of the control_file being executed.
When packaging software, you can define a physical name
and path for a control file in a depot. This lets you
define the control_file with a name other than its tag
and lets you use multiple control file definitions to
point to the same file. A control_file can query the
SW_CONTROL_TAG variable to determine which tag is being
executed.
SW_LOCATION
Defines the location of the product, which may have been
changed from the default product directory. When com‐
bined with the SW_ROOT_DIRECTORY, this variable tells
scripts where the product files are located.
SW_PATH
A PATH variable which defines a minimum set of commands
available to for use in a control script (e.g.
/sbin:/usr/bin).
SW_ROOT_DIRECTORY
Defines the root directory in which the session is oper‐
ating, either "/" or an alternate root directory. This
variable tells control scripts the root directory in
which the products are installed. A script must use this
directory as a prefix to SW_LOCATION to locate the prod‐
uct's installed files. The configure script is only run
when SW_ROOT_DIRECTORY is "/".
SW_SESSION_OPTIONS
Contains the pathname of a file containing the value of
every option for a particular command, including software
and target selections. This lets scripts retrieve any
command options and values other than the ones provided
explicitly by other environment variables. For example,
when the file pointed to by SW_SESSIONS_OPTIONS is made
available to a request script, the targets option con‐
tains a list of software_collection_specs for all targets
specified for the command. When the file pointed to by
SW_SESSIONS_OPTIONS is made available to other scripts,
the targets option contains the single software_collec‐
tion_spec for the targets on which the script is being
executed.
SW_SOFTWARE_SPEC
This variable contains the fully qualified software spec‐
ification of the current product or fileset. The soft‐
ware specification allows the product or fileset to be
uniquely identified.
Signals
The swverify command catches the signals SIGQUIT, SIGINT, and SIGUSR1.
If these signals are received, the command prints a message, sends a
Remote Procedure Call (RPC) to the agents to wrap up after completion,
and then exits.
The agent ignores SIGHUP, SIGINT, and SIGQUIT. It immediately exits
gracefully after receiving SIGTERM, SIGUSR1, or SIGUSR2. Killing the
agent may leave corrupt software on the system, and thus should only be
done if absolutely necessary. Note that when an SWMGR command is
killed, the agent does not terminate until completing the task in
progress.
The daemon ignores SIGHUP, SIGINT and SIGQUIT. It immediately exits
gracefully after receiving SIGTERM and SIGUSR2. After receiving
SIGUSR1, it waits for completion of a copy or remove from a depot ses‐
sion before exiting, so that it can register or unregister depots if
necessary. Requests to start new sessions are refused during this wait.
RETURN VALUES
The swverify command returns:
0 The software_selections were successfully verified.
1 The verify operation failed on all target_selections.
2 The verify operation failed on some target_selections.
DIAGNOSTICS
The swverify command writes to stdout, stderr, and to specific log‐
files.
Standard Output
The swverify command writes messages for significant events. These
include:
· a begin and end session message,
· selection, analysis, and execution task messages for each
target_selection.
Standard Error
The swverify command also writes messages for all WARNING and ERROR
conditions to stderr.
Logging
The swverify command logs summary events at the host where the command
was invoked. It logs detailed events to the swagent logfile associated
with each target_selection.
Command Log
The swverify command logs all stdout and stderr messages to the
the logfile /var/adm/sw/swverify.log. (The user can specify a
different logfile by modifying the logfile option.)
Target Log
A swagent process performs the actual verify operation at each
target_selection. When verifying installed software, the swa‐
gent logs messages to the file var/adm/sw/swagent.log beneath
the root directory (e.g. / or an alternate root directory).
When verifying available software (within a depot), the swagent
logs messages to the file swagent.log beneath the depot direc‐
tory (e.g. /var/spool/sw).
EXAMPLES
Verify the C and Pascal products installed at the local host:
swverify cc pascal
Verify a particular version of OSPXV:
swverify OSPXV,1=/opt/OSPXV_v2.0
Verify the entire contents of a local depot:
swverify-d \* /var/spool/sw
Verify the C and Pascal products on remote hosts:
swverify cc pascal hostA hostB hostC
FILES
$HOME/.swdefaults
Contains the user-specific default values for some or all SWMGR
options.
$HOME/.sw/sessions/
Contains session files automatically saved by the SWMGR com‐
mands, or explicitly saved by the user.
/usr/lib/sw/sys.defaults
Contains the master list of current SWMGR options with their
default values.
/var/adm/sw/
The directory which contains all the configurable and non-con‐
figurable data for SWMGR. This directory is also the default
location of logfiles.
/var/adm/sw/defaults
Contains the active system-wide default values for some or all
SWMGR options.
/var/adm/sw/getdate.templ
Contains the set of date/time templates used when scheduling
jobs.
/var/adm/sw/products/
The Installed Products Database (IPD), a catalog of all products
installed on a system.
/var/spool/sw/
The default location of a target software depot.
SEE ALSOsd(4), sd(5), swacl(8), swagentd(8), swask(8), swconfig(8), swget‐
tools(8), swinstall(8), swlist(8), swmodify(8), swpackage(8), swpack‐
age(4), swreg(8), swremove(8), and the Managing Tru64 UNIX Software
With the SysMan Software Manager manual.
Compaq Computer Corporation swverify(8)