Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ swagent(8) — HP-UX 9.10

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

swacl(8)

swconfig(8)

swcopy(8)

swdepot(8)

swinstall(8)

swpackage(8)

swremove(8)

swverify(8)

swpackage(4)

sd(4)

sd(5)

swagentd(8)  —  SD 2.0 Release

swagent(8)

NAME

swagentd − Serve local or remote software management tasks

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

SYNOPSIS

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

DESCRIPTION

The roles of software 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 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. 

Options

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

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

-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 defaults
These defaults apply only to the daemon.

swagentd.logfile=/var/adm/sw/swagentd.log
This is the default daemon log file.

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

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

Agent defaults
These defaults 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. 

swagent.kernel_build_cmd=/usr/lbin/kernel_build
Defines the script called by the agent for kernel building.

swagent.reboot_cmd=/etc/reboot
Defines the command called by the agent to reboot the system.

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

swagent.compress_cmd=/usr/bin/compress
Defines the command called by the source agent to compress files before transmission.

swagent.uncompress_cmd=/usr/bin/uncompress
Defines the command called by the target agent to uncompress files after transmission.

Remote Procedure Call Options
These options apply to the DCE, SDU Security and Remote Procedure Call (RPC) options:

swagentd.rpc_binding_info=ncadg_ip_udp:[2121] ncacn_ip_tcp:[2121]
Defines the protocol sequence(s) and endpoint(s) which may be used to contact swagentd.  This value should be consistent among all hosts that work together.  See sd(5) for details on specifying this option. 

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

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:

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_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). 

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. 

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. 

/var/adm/sw/defaults

Contains the 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. 

AUTHOR

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

SEE ALSO

swacl(8), swconfig(8), swcopy(8), swdepot(8), swinstall(8), swpackage(8), swremove(8), swverify(8), swpackage(4), sd(4), sd(5), and the HP OpenView Software Distributor Administrator’s Guide.

Hewlett-Packard Company  —  Software Distributor 2.0

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