Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ swagent(1M) — HP-UX 10.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

sd(4)

sd(5)

swacl(1M)

swcluster(1M)

swconfig(1M)

swcopy(1M)

swgettools(1M)

swinstall(1M)

swjob(1M)

swlist(1M)

swmodify(1M)

swpackage(1M)

swpackage(4)

swreg(1M)

swremove(1M)

swverify(1M)

update(1M)

swagentd(1M)  —  Hewlett-Packard Company

swagent(1M)

NAME

swagentd − Serve local or remote SD software management tasks, including invoking a swagent command. 

swagent − Perform SD software management tasks as the agent of an SD command. 

SWAGENTD.EXE − Perform HP OpenView Software Distributor PC software management tasks, or serve local PC software for distribution. See "Remarks:" below. 

SYNOPSIS

swagentd [-k] [-n] [-r] [-x option=value] [-X option_file]

SWAGENTD.EXE (HP OpenView Software Distributor only)

Remarks:

SD-UX commands are included with the HP-UX Operating System and manage software on the local host only.  To install and manage software simultaneously on multiple remote hosts (including PCs) from a central controller, you must purchase the HP OpenView Software Distributor (HP Prod. No. B1996AA) which provides extended software management, multi-site software distribution capabilities and distribution to PCs.  While most of the information in this manual page applies to both SD-UX commands and the OpenView product, some applies only to the OpenView product. Where this is the case, you will see:

The following xxx applies only to HP OpenView Software Distributor

DESCRIPTION

The roles of UNIX target and source systems require two processes known as the daemon and agent.  For most purposes, the distinction between these two processes is invisible to the user and they can be viewed as a single process. 

Each SD command interacts with the daemon and agent to perform its requested tasks. 

The swagentd daemon process must be scheduled before a UNIX system is available as a target or source system.  This can be done either manually or in the system start-up script.  The swagent agent process is executed by swagentd to perform specific software management tasks.  The swagent agent is never invoked by the user. 

The following paragraph applies only to HP OpenView Software Distributor

The roles of PC target and source systems require a single Windows application, SWAGENTD.EXE, which combines the swagent and swagentd functionality.  Each PC running the SWAGENTD.EXE is a PC Controller.  When distributing PC software, it acts as a fanout server to PC targets.  (These targets run SD PC agent programs to perform the actual software installation tasks.) 

Options

The swagentd command supports the following options to control its behavior:

-k The "kill" option stops the currently running daemon.  Stopping the daemon will not stop any agent processes currently performing management tasks (such as installing or removing software), but will cause any subsequent management requests to this host to be refused.  This option is equivalent to sending a SIGTERM to the daemon that is running. 

-n The no fork option runs the daemon as a synchronous process rather than the default behavior of forking to run it asynchronously.  This is intended for running the daemon from other utilities that schedule processes, such as init. 

-r The restart option stops the currently running daemon, and then restarts a new daemon.  This operation is required whenever modifying default options that apply to the daemon, since defaults are only processed on startup. 

-x option=value Set the option to value and override the default value (or a value in an option_file specified with the -X option).  Multiple -x options can be specified. 

-X option_file Read the session options and behaviors from options_file.

EXTERNAL INFLUENCES

Defaults File

In addition to the standard options, several swagentd and swagent behaviors and policy options can be changed by editing the default values found in:

/var/adm/sw/defaults - the system-wide default values,

$HOME/.sw/defaults - the user-specific default values. 

Values must be specified in the defaults file using this syntax:

swagentd.option=value
swagent.option=value

The default values for swagentd can be overridden by specifying an options file with the -X option, or by specifying -x option=value on the command line. 

Daemon options
These options apply only to the daemon, swagentd.  After changing daemon options, the daemon must be restarted in order for these options to be recognized (see the -r option). 

agent=/usr/lbin/swagent
The location of the agent program invoked by the daemon.

logdetail=false[true]
The SD loglevel and logdetail options allow you to choose what amount of information you need in your logfiles - from no detail to complete information. 
 
The loglevel=0 option allows no information to be written to the logfile.  This essentially turns off the logfile process. 
 
The logdetail=true[false] option controls the amount of detail written to the logfile.  Here are the possible combinations of loglevel and logdetail options:

Log Level Log Detail Information Included
loglevel=0 No information is
written to the logfile.
loglevel=1 logdetail=false Only POSIX events are
logged; this is the
default.
loglevel=1 logdetail=true POSIX detail as above
plus task progress
messages.  Setting
loglevel=1 is not
necessary, it is the
default.
loglevel=2 logdetail=false POSIX and file level
messages only.
Setting the
logdetail=false
option is not necessary.
loglevel=2 logdetail=true All information
is logged. Setting both
loglevel=2 and
logdetail=true
options is required. With
this combination you
may get the same logfile
behavior as previous
HP-UX 10.x releases.

logfile=/var/adm/sw/swagentd.log

This is the default log file for the swagentd daemon. 

max_agents=-1
The maximum number of agents that are permitted to run simultaneously. The value of -1 means that there is no limit.

The following option applies only to HP OpenView Software Distributor

minimum_job_polling_interval=1
Defines how often, in minutes, the daemon will wake up and scan the job queue to determine if any scheduled jobs need to be initiated or if any active jobs need their remote target status cached locally (see swinstall.job_polling_interval ).  If set to 0, no scheduled jobs will be initiated, and no caching of active jobs will occur. 

swagentd.rpc_binding_info=ncacn_ip_tcp:[2121] ncadg_ip_udp:[2121]
This defines the protocol sequences and endpoints which may be used to contact the swagentd process (the protocols and endpoints that the swagentd process is listening on).  This value should be consistent among all hosts that work together. 

swagent.rpc_binding_info_alt_source=ncadg_ip_udp:[2121]
This option supports the same syntax and semantics as for the swagentd option (described above).  This option is effecgive only when the agent attempts to contact an alternate source depot (as specified by the alt_source option). 

Agent options
These options apply only to the agent, swagent. 

alternate_source=
If the swinstall or swcopy controller has set use_alternate_source=true, the target agent will consult and use the configured value of its own alternate_source option to determine the source that it will use in the install or copy. 

The agent’s value for alternate_source is specified using the host:path syntax.  If the host portion is not specified, then the local host is used.  If the path portion is not specified, then the path sent by the command is used.  If there is no configured value at all for alternate_source, the agent will apply the controller-supplied path to its own local host. 

compress_cmd=/usr/contrib/bin/gzip
Defines the command called by the source agent to compress files before transmission.  If the compression_type is set to other than gzip or compress, this path must be changed. 

compression_type=gzip
Defines the default compression_type used by the agent when it compresses files during or after transmission. If uncompress_files is set to false, the compression_type is recorded for each file compressed so that the correct uncompression can later be applied during a swinstall, or a swcopy with uncompress_files set to true. The compress_cmd specified must produce files with the compression_type specified. The uncompress_cmd must be able to process files of the compression_type specified unless the format is gzip, which is uncompressed by the internal uncompressor ( funzip).  The only supported compression types are compress and gzip. 

config_cleanup_cmd=/usr/lbin/sw/config_clean
Defines the script called by the agent to perform release-specific configure cleanup steps.  For and NFSD client update, this script will invoke the tlink command. 

install_cleanup_cmd=/usr/lbin/sw/install_clean
Defines the script called by the agent to perform release-specific install cleanup steps immediately after the last postinstall script has been run. For an OS update, this script should at least remove commands that were saved by the install_setup script.  This script is executed after all filesets have been installed, just before the reboot to the new operating system. 

install_setup_cmd=/usr/lbin/sw/install_setup
Defines the script called by the agent to perform release-specific install preparation.  For an OS update, this script should at least copy commands needed for the checkinstall, preinstall, and postinstall scripts to a path where they can be accessed while the real commands are being updated. This script is executed before any kernel filesets are loaded.

kernel_build_cmd=/usr/sbin/mk_kernel
Defines the script called by the agent for kernel building after kernel filesets have been loaded.

kernel_path=/stand/vmunix
Defines the path to the system’s bootable kernel.  This path is passed to the kernel_build_cmd via the SW_KERNEL_PATH environment variable. 

mount_cmd=/sbin/mount
Defines the command called by the agent to mount all filesystems.

reboot_cmd=/sbin/reboot
Defines the command called by the agent to reboot the system after all filesets have been loaded, if any of the filesets were filesets requiring reboot.

rpc_binding_info=ncadg_ip_udp:[2121]
This defines the protocol sequence and endpoint used when the agent attempts to contact an alternate source depot (as specified by the alternate_source option).  See sd(5) for details on specifying this option. 

remove_setup_cmd=/usr/lbin/sw/remove_setup
Defines the script called by the agent to perform release-specific remove preparation.  For an OS update, this script will invoke the tlink command when a fileset is removed. 

system_file_path=/stand/system
Defines the path to the kernel’s template file.  This path is passed to the system_prep_cmd via the SW_SYSTEM_FILE_PATH environment variable. 

system_prep_cmd=/usr/lbin/sysadm/system_prep
Defines the kernel build preparation script called by the agent. This script must do any necessary preparation so that control scripts can correctly configure the kernel about to be built.  This script is called before any kernel filesets have been loaded.

uncompress_cmd=
Defines the command called by the target agent to uncompress files after transmission. This command processes files which were stored on the media in a compressed format. If the compression_type store with the file is gzip then the internal uncompression ( funzip) is used instead of the external uncompress_cmd.  The default value for HP-UX is undefined. 

The swagent (target) log files cannot be relocated.  They always exist relative to the root or depot target path (e.g.  /var/adm/sw/swagent.log for the root / and /var/spool/sw/swagent.log for the depot /var/spool/sw ). 

The following line applies only to HP OpenView Software Distributor

The target log files may be viewed using the swjob command. 

Session File

The swagentd and swagent do not use a session file. 

Environment Variables

The swagent program sets these environment variables for use by the control scripts being executed on behalf of the SD commands:

LANG

Determines the language in which messages are displayed.  If LANG is not specified or is set to the empty string, a default value of C is used.  See lang(5) for more information. 

NOTE: The language in which the SD agent and daemon log messages are displayed is set by the system configuration 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. 

SW_PATH

A PATH variable which defines a minimum set of commands available to for use in a control script (e.g.  /bin:/usr/bin). 

SW_ROOT_DIRECTORY

Defines the root directory in which the session is operating, 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 product’s installed files. 

SW_LOCATION

Defines the location of the product, which may have been changed from the default product directory.  When combined with the SW_ROOT_DIRECTORY, this variable tells scripts where the product files are located. 

SW_SOFTWARE_SPEC

This variable contains the fully qualified software specification of the current product or fileset.  The software specification allows the product or fileset to be uniquely identified. 

SW_CONTROL_DIRECTORY

Defines the current directory of the script being executed, either a temporary catalog directory, or a directory within in the Installed Products Database (IPD).  This variable tells scripts where other control scripts for the software are located (e.g. subscripts). 

SW_INITIAL_INSTALL

This variable is normally unset.  If it is set, the swinstall session is being run as the back end of an initial system software installation ("cold" install). 

SW_DEFERRED_KERNBLD

This variable is normally unset.  If it is set, the actions necessary for preparing the system file /stand/system cannot be accomplished from within the postinstall scripts, but instead must be accomplished by the configurescripts.  This occurs whenever software is installed to a directory other than /, such as for a cluster client system. This variable should be read only by the configure and postinstall scripts of a kernel fileset.  The swinstall command sets these environment variables for use by the kernel preparation and build scripts. 

SW_KERNEL_PATH

The path to the kernel.  The default value is /stand/vmunix, defined by the swagent option or kernel_path. 

SW_SYSTEM_FILE_PATH

The path to the kernel’s system file.  The default value is /stand/system. 

Signals

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 session before exiting, so that it can register or unregister depots.  Requests to start new sessions are refused during this wait. 

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 SD command is killed, the agent does not terminate until completing the task in progress. 

Locking

The swagentd ensures that only one copy of itself is running on the system. 

Each copy of swagent that is invoked uses appropriate access control for the operation it is performing and the object it is operating on. 

The following section on the Initialization File applies only to HP OpenView Software Distributor

Windows Initialization File

The SWAGENTD.EXE supports the following configuration values in the file:

<WINDOWS>\SWAGENTD.INI - the initialization file for the PC Controller. 

Values must be specified in the initialization file using this syntax:

[section]
keyword=value

(These values are usually modified using the SWAGENTD.EXE’s Configure dialog.) 

Environment Section
These keywords are defined in the Environment section of the initialization file. 

DataDirectory=...\sd\data
The data directory set at installation, which contains the PC depot and other PC Controller data files.

ViewCommand=sdview.exe
The command used to display the PC Controller logfile when the View Log... menu item is selected.

Note that SWAGENTD.EXE does not allow the configuration of the rpc_binding_info option, as described for swagentd and swagent above.  To allow correct execution on a variety of TCP/IP stacks, the SWAGENTD.EXE always uses the value ncacn_ip_tcp:[2121]. 

Security Section
These keywords are defined in the Security section of the initialization file. 

user=root
The UNIX user at the specified UNIX host (below) who is granted all SD access permissions to the PC Controller. (I.e. This remote user has permission to perform any SD action at this PC Controller.)

group=swadm
The UNIX group at the specified UNIX host (below) which is granted all SD access permissions to the PC Controller. (I.e. This remote group has permission to perform any SD action at this PC Controller.)

hostname=hostname
The UNIX host from which the specified user and group (above) is granted all SD access permissions.

secret=-sdu-
The secret password used in SD’s internal form of authentication. (The -sdu- default value matches the default value defined for the SD commands.) 

RETURN VALUES

When the -n option is not specified, the swagentd returns:

0 The daemon is successfully initialized and is now running in the background. 

non-zero
Initialization failed and the daemon terminated.

When the -n option is specified, the swagentd returns:

0 The daemon successfully initialized and then successfully shutdown. 

non-zero
Initialization failed or the daemon unsuccessfully terminated.

DIAGNOSTICS

The swagentd and swagent commands log events to their specific logfiles. 

Daemon Log
The daemon logs all events to /var/adm/sw/swagentd.log. (The user can specify a different logfile by modifying the logfile option.) 

Agent Log
When operating on (alternate) root filesystems, the swagent logs messages to the file var/adm/sw/swagent.log beneath the root directory (e.g.  / or an alternate root directory).  When operating on software depots, the swagent logs messages to the file swagent.log beneath the depot directory (e.g.  /var/spool/sw). When accessing a read-only software depot (e.g. as a source), the swagent logs messages to the file /tmp/swagent.log.

EXAMPLES

To start the daemon:

/usr/sbin/swagentd

FILES

/var/adm/sw/

The directory which contains all of the configurable (and non-configurable) data for SD.  This directory is also the default location of logfiles. 

/var/adm/sw/host_object

The file which stores the list of depots registered at the local host. 

/usr/lib/sw/sys.defaults

Contains the master list of current SD options (with their default values). 

/var/adm/sw/defaults

Contains the active system-wide default values for some or all SD options. 

$HOME/.sw/defaults

Contains the user-specific default values for some or all SD options. 

The following on PC files applies only to HP OpenView Software Distributor

PC FILES

...\SD\DATA\

The directory which contains all of the configurable (and non-configurable) data for SD. 

<WINDOWS>\SWAGENTD.INI

Contains the configurable options for the SD PC Controller. 

AUTHOR

swagentd and swagent were developed by the Hewlett-Packard Company. 

SEE ALSO

sd(4), sd(5), swacl(1M), swcluster(1M), swconfig(1M), swcopy(1M), swgettools(1M), swinstall(1M), swjob(1M), swlist(1M), swmodify(1M), swpackage(1M), swpackage(4), swreg(1M), swremove(1M), swverify(1M), update(1M), and the HP OpenView Software Distributor Administrator’s Guide or Managing HP-UX Software with SD-UXmanuals.

Hewlett-Packard Company  —  HP-UX Release 10.20:  July 1996

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026