Previous section.

Distributed Software Administration - DCE Interoperability (XDSA-DCE)

Distributed Software Administration - DCE Interoperability (XDSA-DCE)
Copyright © 1997 The Open Group


This chapter describes the XDSA-DCE daemon and agent processes. This is performed using the swagentd command. It is specified in reference manual page (man-page) format. DCE-RPC Interoperability (XDSA-DCE) - swagentd
Previous section.

Why not acquire a nicely bound hard copy?
Click here to return to the publication details or order a copy of this publication.


swagentd - serve local or remote software management tasks


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


The roles of target and source systems require one or two processes known as the daemon swagentd and agent swagent. The swagentd serves the daemon XDSA-DCE RPC interface while the swagent serves the agent XDSA-DCE interface.

Whether the daemon and agent are separate processes is implementation defined, and relates to whether the operating system supports multi-tasking (in which case swagentd and swagent may be separate processes) or not (in which case a swagent session may be part of the swagentd process).

For most purposes, the distinction between the daemon and agent is invisible to the user and they can be viewed as a single process. Each distributed POSIX 1387.2 standard command interacts with the swagentd daemon and possibly a swagent session to perform its requested tasks.

The swagentd() daemon must be running before a system is available as a target or source system. This can be done either manually or in a system start-up script. A swagent session is initiated by swagentd to perform specific software management tasks. If the swagent session is a separate process, it is never invoked by the user, only by swagentd.


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

The kill option stops the currently running daemon. Stopping the daemon will not stop any swagent sessions currently performing management tasks (such as installing or removing software), but will cause any subsequent management requests to this host to be refused.

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.

The restart option stops any 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 option_file.


The swagentd daemon does not support any operands.


Extended Options
The swagentd() daemon supports the following extended options:


The location of the swagent program invoked by the swagentd daemon if the implementation requires a separate agent program.


This is the default log file for the swagentd daemon.


The maximum number of agent sessions that are permitted to run simultaneously. The value of -1 means that there is no limit.

rpc_binding_info=ncadg_ip_udp:[2121] ncacn_ip_tcp:[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 XDSA-DCE hosts that work together.

The swagent session supports the following options. These options apply only to the agent. If a command prefix is used with these options, that command prefix must be "swagent".


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

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 manager-supplied path to its own local host.


Defines the command called by the source agent to compress files before transmission.


Defines the default script called by the agent for kernel building after kernel filesets have been loaded in the case where the product containing those filesets has not defined a value for its postkernel attribute.


Defines the command called by the agent to mount all filesystems if the mount_all_filesystems option is set to TRUE.


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.


This defines the protocol sequence and endpoint used when the agent attempts to contact an alternate source distribution (as specified by the alternate_source option).


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.

The swagent (target software collection) log files cannot be relocated. They always exist relative to the installed software collection or distribution target path (for example, /var/adm/sw/swagent.log for the installed software collection "/", and /var/spool/sw/swagent.log for the distribution /var/spool/sw).

Environment Variables
The POSIX 1387.2 standard environment variables affecting the operation of swagentd process (and swagent session) include:

The swagent session sets the POSIX 1387.2 standard environment variables for use by the control scripts being executed on behalf of the SD commands:




The swagentd daemon does not write to stdout.


The swreg utility writes events with a status of SW_WARNING or SW_ERROR to stderr for any errors or warnings during startup. After startup, all errors and warnings only are written to the daemon and agent log files.


The swagentd daemon logs all events from the daemon XDSA-DCE RPC interfaces in the logfile location defined by the logfile option.

When operating on installed software collections or distributions, the swagent target session logs messages to a logfile relative to the installed software collection or distribution path. The swagent source session logs messages to the same logfile location, except when the source is a serial media or a read-only media. In this case, the location of the source logfile is implementation defined.


After initialization, the swagentd daemon listens for daemon RPC requests and processes them as it receives them.

An agent session is started when the daemon gets the RPC sw_rpc_agent_init() (which spawns an swagent process if needed), followed by the agent RPC sw_rpc_begin_session(). That agent session listens for requests until it gets the RPC sw_rpc_end_session(), which ends the session (and stops the swagent process if needed).


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

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

Initialization failed and the daemon terminated.

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

The daemon successfully initialized and then successfully shutdown.

Initialization failed or the daemon unsuccessfully terminated.


If there is an initialization error, the daemon terminates.

Contents Next section Index