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
Managing HP-UX Software With SD-UX: HP 9000 Computers > Chapter 5 Listing Software

Creating Software Lists

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

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= defaults, see the “Advanced Topics for swlist section). You must decide what levels you want and what software attributes to list in addition to the product name.

NOTE: Examples in this section were created with the one-liner= option left blank.

Specifying Product Level

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 and 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.

Specifying Fileset Level

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 ARPA/Berkeley Services
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 Network File System Services
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.

If you are listing filesets on a depot (swlist -l fileset -a title -d NETWORKING), make sure the -d is in the proper position. The -d must PRECEDE the fileset name.

Specifying Files Level

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_INC:/usr/adm/sw/products/NETWORKING/ARPA-INC/index

.
.
.

# 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.

Depot Lists

Another class of objects that swlist can display are depot lists. This allows you to list all the registered depots residing on a local host. To do this, you can use a combination of the -l depot option:

Table 5-2 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

 

Verbose List

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/700
machine_type 9000/700
os_name HP-UX
target.os_release A.08*

If the -v option is used with the -l option, the cases are:

  • To display all attributes for a bundle, use swlist -vl bundle.

  • To display all attributes for a product, use swlist -vl product.

  • To display all attributes for products and subproducts, use swlist -vl subproduct.

  • To display all attributes for products, subproducts and filesets, use swlist -vl fileset.

  • To display all attributes for products, subproducts, filesets and files, use swlist -vl 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 swlist -vl level designation command (see above) or swlist -v software name (see example below) on your system.

Table 5-3 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 NETWORKING.ARPA-RUN

produces this 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

This command:

swlist -vlfile 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
.
.
.
Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1997 Hewlett-Packard Development Company, L.P.