|
» |
|
|
|
The swlist command creates customizable listings of the software products installed
on your local host or stored in depots for later distribution. swlist Features and Limitations | |
With swlist you can: Specify the level (bundles,
products, subproducts, filesets or files) to show in your list. Specify a set of software
attributes to display for each level. Software attributes are items
of information about products contained in the Installed Products
Database or in catalog files. These items can include the product’s
name or tag, its size (in Kbytes), revision number, etc. Create a list of products,
subproducts or filesets to use as input to the swinstall or swremove commands. Display a table of contents
for a software source. Display selected software
attributes for each level. Show the product structure
of software selections. List software stored in
an alternate root directory. Display the depots on
a specified host. List the categories of
available or applied patches. List the values of a fileset’s
applied patches.
Using the swlist GUI | |
The swlist -i command starts a swlist GUI
program that lets you interactively list software and display software
information. The swlist -i -d command lets
you display information about the software available in a depot or
on a physical media. Bundles and products are
the default top-level display. To open an item on the
list, double-click on the item. Double-clicking on a file
displays the file attributes.
Searching and Moving Through the List The following features help you search and move
through the list: To search the current
list, select File→Search... To display a pop-up menu
of viewing options for an item, right-click on the item. The pop-up
options are: Open Item to show the contents of the item. Close Level to close the current item and displays the next higher level of
objects. Show Description
of Software... to display attribute information about the
current item.
Use the View menu to change the
columns displayed, select filters, and sort information: Columns displays the Columns Editor. You can choose which columns of software
information to display (i.e. software name, revision number, information,
size in Kbytes, architecture, category, etc.) and their order. Filter... displays a dialog from which you can filter the display list with
logical and relational operators for each field. Sort... lets you select sort fields, order, and criteria for the information
displayed. Change Software
View lets you toggle between a top-level view and a products
view. Change Software
Filter... lets select from a list of predefined filters.
(Only applies to top-level software objects.)
Use the Actions menu to open
and close items on the display, show logfile information, and show
software descriptions: Open Item opens an item. (Same as double-clicking on the item.) Close Level closes the current level. (Same as double-clicking on ..(go up). Change Target opens a dialog box that lets you enter a path to select an alternate
root (for swlist -i) or alternate depot (for swlist -i -d). Show Logfile displays the system logfile. Show Audit Log displays software depot audit information stored in the audit log
(for swlist -i -d only). See “Source Depot Auditing” for more information. Show Description
of Software displays attribute information about the currently
selected item.
Using the Command Line | |
Syntaxswlist [-d|-r] [-i] [-R] [-v] [-a attribute] [-c catalog]
[-C session_file] [-f software_file] [-l level] [-s source]
[-S session_file] [-t target_file] [-x option=value]
[-X option_file] [software_selections] [@ target_selections] |
Options and Operands- -d
List products available
from a depot. See “Listing the Contents of a Depot (swlist -d) ”. - -i
Start the GUI. (See “Using the swlist GUI”.) - -r
List products on an alternate
root (instead of /). - -R
Shorthand for -l bundle -l product -l subproduct -l fileset - -a attribute
Displays a specific attribute.
To display multiple attributes, specify multiple -aoptions. To list the full set of attributes for a software object,
use the -v option. Note that the tag attribute is always displayed
for products, subproducts, and filesets. The path (filename) attribute
is always displayed for file objects. This option does not apply if
you use the -c option. - -v
List all attributes for
an object if no -a option is specified.
(Vendor-defined attributes are not included.) The output lists one
attribute per line in the format: attribute_name attribute_value - -c catalog
Writes full catalog structure
information into the directory specified by catalog. You can use this information for distributions and to list installed
software catalog information. All attributes down to the file level
and control scripts are written. If you use this option, the -a and -l options
do not apply. See “Requesting User Responses (swask)”. - -C session_file
Run the command and save
the current option and operand values to a session_file for re-use
in another session. See “Session Files”. - -f software_file
Read a list of software
selections from a separate file instead of (or in addition to) the
command line. See “Software Files”. - -l level
List all software objects down to the specified level: depot, bundle, product, subproduct, fileset or file. (See the section “Listing Software by Levels” for more information
on levels.) You can use only one level designation per command. You
cannot use software names, subproduct names, etc. to specify levels.
This option does not apply if you use the -c option. Table 3-2 The -l Options Option | Action |
---|
swlist -l root | Shows the root level (roots
on the specified target hosts) | swlist -l shroot | Shows the shared roots | swlist -l prroot | Shows the private roots | swlist -l bundle | Shows only bundles | swlist -l product | Shows only products | swlist -l subproduct | Shows products and subproducts | swlist -l fileset | Shows products, subproducts
and filesets | swlist -l file | Shows products, subproducts,
filesets, files and numbers (used in software licensing). | swlist -l category | Shows all categories of available
patches for patches that have included category objects in their definition. | swlist -l patch | Shows all applied patches. |
- -s source
Specify which software
source is to be listed. The default source type is a directory or
depot (usually /var/spool/sw) on the local host.
The syntax is: [host][:][/directory] A host may be specified by its host name,
domain name, or internet address. A directory must be specified by
an absolute path. - -S session_file
Run the command based
on values saved from a previous installation session, as defined in session_file. See “Session Files”. - -t target_file
Read a list of target
selections from a separate file instead of (or in addition to) the
command line. - -x option=value
Sets a command option to value and overrides
default values or a values in options files. See “Changing Command Options”. - -X option_file
Read session options and
behaviors from option_file. See “Changing Command Options”. - software_selections
The software objects to
be listed. See “Software Selections”. - target_selections
The target of the command.
(For swlist, target_selections are just another way to list software selections.
Changing Command OptionsYou can
change the behavior of this command by specifying additional command-line
options when you invoke the command (using the -xoption) or by reading predefined values from a file. The following
table shows the defaults and options that apply to swlist. Table 3-3 swlist Command Options and Default Values admin_directory=/var/adm/sw agent_timeout_minutes=10000 distribution_target_directory=/var/spool/sw installed_software_catalog=products patch_one_liner=title patch_state
| rpc_binding_info=ncacn_ip_tcp:[2121] ncadg_ip_udp:[2121] show_superseded_patches=false software_view=all_bundles
|
For More InformationSee Appendix A for complete descriptions of each default. Software Listing Tasks and Examples | |
To run the swlist interactive
interface: swlist -i @ host1 To use interactive swlist to
view a depot: swlist -i -d @ /tmp/depot To produce a list of the
software (by name) installed at root (/) on your
local host, you would simply type: swlist Which might produce a listing on your display
like this: # Initializing...
# Contacting target "xxyyzz"...
#
# Target: xxyyzz:/
# Bundle(s):
B3782CA B.11.00 HP-UX Media Kit (Reference Only. See Descr.)
B3898AA B.11.00 HP C/ANSI C Developer’s Bundle for HP-UX 11.00
HPUXEngRT B.11.00 English HP-UX Run-time Environment
# Product(s) not contained in a Bundle:
HMS 1.01
OBAM5_0 B.11.00 ObAM 5.0 |
Using swlist with no options
set and no software selected gives you a listing of all software bundles
plus all products that are not part of a bundle. Adding the -d option gives you the same listing of software residing
in the default depot on your local host. In the following examples, swlist requests are sent to the standard output. All examples
assume the one_liner= default is “revision
size title” and the level= default is “product.” To list the contents of
the local tape depot, /dev/rmt/0m, type: swlist -d @ /dev/rmt/0m — or — swlist -s /dev/rmt/0m This produces the following output AUDIT 3.5 9834 Trusted Systems Auditing Utils
COMMANDS 1.7 4509 Core Command Set
C-LANG 2.5 5678 C Programming Language
NETWORKING 2.1 9072 Network Software
KERNEL 1.4 56908 Kernel Libraries and Headers
VUE 1.3 5489 Vue (Instant Ignition Release)
WINDOWS 2.06 10423 Windowing Products |
List all the media attributes
of the local tape depot, /dev/rmt/0m: swlist -v -l depot @ /dev/rmt/0m — or — swlist -vl depot -s dev/rmt/0m type distribution
tag CORE OS
description HP-UX Core Operating System Software Disk
number B2358-13601
mod_date June 1998 |
List the README file for
product, OS_CORE installed on the local host: swlist -a readme OS-Core | more readme:
****************
* Introduction *
****************
The Release Notes for HP-UX Release X.0 contain an
overview of the new/changed product features that
are included in the release. For detailed
information about these features, refer to the
appropriate product manuals. This document does not
contain information about software changes made as a
result of a Service Request; that information may be
found in the Software Release Bulletin (SRB) for Release X.0. |
********************
* Hardware Support *
********************
The HP 9000 Model XXX is no longer supported.
... |
List the products stored
in the software depot on host1 located at /swmedia. For this example assume the swlist one_liner is: “title size architecture”: swlist -d @ host1:/swmedia FRAME Frame Doc. Pkg 2319 HP-UX_9000_Series_AorB
FRAME Frame Doc. Pkg 2458 OSF1_9000_Series_1.0
ME30 3-D Mech. Eng 5698 HP-UX_9000_Series300_AorB
SOFTBENCH Dev Env 4578 HP-UX_9000_Series300
TEAMWORK Design/Analysis 3478 HP-UX_9000_Series 300/400 |
(Note that the media contains two revisions of
the FRAME product.)
Using Options to Change List AppearanceYou can control the appearance and content of
your lists by changing list default values in the options files. Instead
of repeatedly specifying the software levels and attributes each time
you invoke swlist, you can use: - level
This option pre-determines
what level to list: product, subproduct, fileset or file. For example,
by setting this default to level=fileset, future swlist commands would always list everything
down to and including filesets for each host, depot or product selected. - one_liner="attribute
attribute attribute"
This option specifies
the attributes (revision, size, title, etc.) displayed as the default
listing. These attributes are separated by <tab> or <space>
and enclosed in quotes (" "). You can choose multiple attributes
but not all attribute may exist for all applicable software levels
(product, subproduct, or fileset). For example, the software attribute title is available for bundles, products, subproducts
and filesets, but the attribute architecture is only available for products.
In the absence of the -v or -a option in your command, swlist displays
the information as described in the one_liner default for each software object level (bundle, products, subproducts
and filesets), not for files. You may specify only
one attribute per -a option. However, the tag attribute is always included by default, so
specifying -a revision lists all product names and their revision
numbers. For example, to list whether software bundles
on a CD-ROM (mounted to the directory /SD_CDROM) require a codeword or not, use the command: swlist -d -a is_protected @ /SD_CDROM An attribute containing a large amount of information
(for example, a README) is physically stored as a separate file and
is displayed by itself if -a README is requested. Refer to the sd(4) manpage
for a full list of SD-UX attributes. The swlist options and
defaults allow you to create lists to fit your specific requirements.
These lists can be as simple as listing the software products installed
on your local host or as complex as a multiple column listing of files,
filesets, subproducts, products and bundles installed. For example, if you were to change the one-liner option on the command line, the command: swlist -x one_liner="name revision size title" produces this list of all the products installed
on the local host: RX 1.98 9845 RX X Terminal - all software
ALLBASE 8.00.1 6745 Database Products
C-LANG 2.5 5678 Programming Language
DIAGNOSTICS 2.00 56870 Hardware Diagnostic Programs
DTP68 2.00 26775 Desktop Publishing
LISP-LANG 8.00.1 90786 LISP Programming Language
WINDOWS 2.06 10423 Windowing Products |
This listing shows, in columns from left to right,
the product’s tag, its revision number, its size in Kbytes
and its title or full name. | | | | | NOTE: Whatever you specify in the command line for software
level and attributes will override the values in the default option
files. | | | | |
You can also change the one_liner default value to {revision size title} in the defaults file. Then
a listing of the C-LANG products on host2 would be as follows: swlist C-LANG @ host2 C-LANG.C-COMPILE 8.0 1346 C Compiler Components
C-LANG.C-LIBS 8.0 2356 Runtime Libraries
C-LANG.C-MAN 8.0 1976 Programming Reference |
You can use swlist to list
software patches and their status. Using Software Codewords and Customer IDs The swlist command may prompt you for codewords if you try to view codeword
protected software. You can also enter new codewords from the command
line or from the GUI. This process is identical to that used by swinstall. See “Using Software Codewords and Customer IDs ” for more information. Listing Software by LevelsThe -l level option lets you list all software objects down to the specified level: depot, bundle, product, subproduct, fileset or file. Choose a level as a starting point and list items
only down to that level. Table 3-4 The -l Options Option | Action |
---|
swlist -l root | Shows the root level (roots
on the specified target hosts) | swlist -l shroot | Shows the shared roots | swlist -l prroot | Shows the private roots | swlist -l bundle | Shows only bundles | swlist -l product | Shows only products | swlist -l subproduct | Shows products and subproducts | swlist -l fileset | Shows products, subproducts
and filesets | swlist -l file | Shows products, subproducts,
filesets, files and numbers (used in software licensing). | swlist -l category | Shows all categories of available
patches for patches that have included category objects in their definition. | swlist -l patch | Shows all applied patches. |
The starting point for a
software list is always taken from the operands in the -l and -a options
(or from the level or one_liner options). You must decide what levels
you want and what software attributes to list in addition to the product
name. | | | | | NOTE: Examples in the following sections do not include
a value for the one_liner option. | | | | |
Specifying
a level for a given software selection causes swlist to list the objects at that level plus all those that are above that level. Upper levels will be commented with
a # sign. Therefore, only the level specified (product, subproduct,
fileset or file) will be uncommented. This allows the output from swlist to be used as input to other commands. The exceptions
are: 1) a list that contains only files; file-level
output is not accepted by other commands 2) a list that contains software attributes (-a and -v). For example, if you wanted to see all the products installed on your local host, your command
would be: swlist -l product and the listing would look like this: NETWORKING
SAM
OPENVIEW
PRODUCT A
SOFTWARE Z
PRODUCT B
.
.
. |
Note that the product names are uncommented because
that was the level you requested to display and there are no levels
above. Specifying Subproduct Level For this
example, on the local host, the NETWORKING product contains the subproducts
ARPA and NFS and you want to see how big each object is (in Kbytes). swlist -l subproduct -a size NETWORKING # NETWORKING 9072
NETWORKING.ARPA 4412
NETWORKING.NFS 4660 |
The list does not show the files or filesets because
you didn’t specify that level on the command line. If you wanted to see the names and revision numbers
for the NETWORKING product on the local host, the command would be: swlist -l subproduct -a revision NETWORKING Remember, the product name is always assumed;
you don’t have to specify it in the -a option. An example
of using the -l option to generate a listing that
includes all filesets for the product NETWORKING on the local host
and a descriptive title for each: swlist -l fileset -a title NETWORKING # NETWORKING Network Software
NETWORKING.ARPA-INC ARPA include files
NETWORKING.ARPA-RUN ARPA run-time commands
NETWORKING.ARPA-MAN ARPA manual pages
NETWORKING.LANLINK CORE ARPA software
NETWORKING.NFS-INC NFS include files
NETWORKING.NFS-RUN NFS run-time commands
NETWORKING.NFS-MAN NFS manual pages |
Again, note the commented lines (#) representing
the subproduct (NETWORKING.ARPA and NETWORKING.NFS) and product (NETWORKING) levels. The other lines are filesets. An example
of the -l option to generate a comprehensive listing
that includes all files for the subproduct NETWORKING.ARPA: swlist -l file NETWORKING.ARPA # NETWORKING.ARPA
# NETWORKING.ARPA_INC
NETWORKING.ARPA_INC:/usr/include/arpa/ftp.h
NETWORKING.ARPA_INC:/usr/include/arpa/telnet.h
NETWORKING.ARPA_INC:/usr/include/arpa/tftp.h
NETWORKING.ARPA_INC:/usr/include/protocols/rwhod.h
.
.
.
# NETWORKING.ARPA_RUN
NETWORKING.ARPA_RUN:/etc/freeze
NETWORKING.ARPA_RUN:/etc/ftpd
NETWORKING.ARPA_RUN:/etc/gated
NETWORKING.ARPA_RUN:/etc/named
.
.
.
# NETWORKING.ARPA_MAN
NETWORKING.ARPA_MAN:/usr/man/man8/ftpd
NETWORKING.ARPA_MAN:/usr/man/man8/gated |
Note that the commented lines represent the requested
level (NETWORKING.ARPA) plus one
level up (fileset) from the specified file level (NETWORKING.ARPA_INC, NETWORKING.ARPA_RUN and NETWORKING.ARPA_RUN are all
filesets). The uncommented lines are files. Another
class of objects that swlist can display are depot
lists. This allows you to list all the registered depots residing
on a host. To do this, you can use a combination of the -l depot option: Table 3-5 Listing Depots swlist syntax | result |
---|
swlist -l depot | list all depots on the local
host | swlist -l depot
@ hostA | list all
depots on hostA | swlist -l depot
-v @ hostB | list,
in verbose mode, all depots on hostB |
The -v option causes a verbose listing to be generated. A verbose
listing is used to display all attributes for products, subproducts,
filesets or files. The verbose output lists each attribute with its
name (keyword). The attributes are listed one per line. Given the
length of this listing, you could post-process (filter) the output
with grep and/or sed to see
specific fields. Attributes for a particular software level are
displayed based on the software product name given with the swlist command. For example, swlist -v NETWORKING gives: tag NETWORKING
instance_id 7869
control_directory
size 9072
revision 2.1
title Network Software
mod_time
directory
vendor.information Hewlett-Packard Company
is_locatable true
architecture HP-UX_9000
machine_type 9000
os_name HP-UX
target.os_release B.11.00* |
If the -v option is used with
the -l option, the cases are: To display all attributes
for a bundle, use swlist -v -l bundle. To display all attributes
for a product, use swlist -v -l product. To display all attributes
for products and subproducts, use swlist -v -l subproduct. To display all attributes
for products, subproducts and filesets, use swlist -v -l
fileset. To display all attributes
for products, subproducts, filesets and files, use swlist
-v -l file.
The table below provides
a sample listing of the kinds of attributes that swlist will display. Not all these attributes exist for each software level
or object. This list may change depending on vendor-supplied information.
Do not use this list as the official list of all attributes. To get
a complete list of the attributes for a particular level or object,
use the format: swlist -v -l level (see example above) or use swlist -v software_selections (see example below). Table 3-6 Sample Attributes Attribute | Description |
---|
architecture | Describes the target system(s) supported
by the product | category | Type of software | copyright | Copyright information about the object | mod_time | Production time for a distribution media | description | Detailed descriptive information about the
object | instance_id | Uniquely identifies this software product | title | Long/official name for the object | mode | Permission mode of the file | mtime | Last modification time for the file | owner | Owner of file (string) | path | Full pathname for the file | corequisite | A fileset that the current fileset needs
(configured) to be functional | prerequisite | A fileset that the current fileset needs
to install or configure correctly | readme | Traditional readme-like information, release notes,
etc. | revision | Revision number for an object | size | Size in bytes; reflects the size of all contained
filesets | state | Current state of the fileset |
Here are some examples of verbose listings: This command on the local host: swlist -v -l file NETWORKING.ARPA-RUN produces this listing: #NETWORKING.ARPA
tag: ARPA-RUN
instance_id 1
revision 1.2
title ARPA run_time commands
size 556
state configured
corequisite NETWORKING.LANLINK
is_kernel true
file etc/freeze
path /etc/freeze
type f
mode 0755
owner bin
group bin
uid 2
gid 2
mtime 721589735
size 24
file etc/ftpd
path /etc/ftpd
type file
mode 0555
owner bin
group bin
uid 2
gid 2
mtime 721589793
size 9
... |
This command: swlist -v NETWORKING.ARPA-RUN produces the following listing: # NETWORKING.ARPA
fileset
tag ARPA-RUN
instance_id 1
revision 1.2
title ARPA run_time commands
size 556
state configured
corequisite NETWORKING.LANLINK
is_kernel true
mod_time 733507112 |
|