NAME [Toc] [Back]
swagent, swagentd - serve local or remote SD software management
tasks, daemon that invokes swagent, respectively
SYNOPSIS [Toc] [Back]
swagent executed by swagentd only.
swagentd [-k] [-n] [-r] [-x option=value] [-X option_file]
Remarks [Toc] [Back]
+ This command supports operation on remote systems. See Remote
+ For an overview of all SD commands, see the sd(5) man page by
typing man 5 sd on the command line.
DESCRIPTION [Toc] [Back]
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
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.
Remote Operation [Toc] [Back]
You can enable SD to manage software on remote systems. To let the
root user from a central SD controller (also called the central
management server or manager node) perform operations on a remote
target (also called the host or agent):
1) Install a special HP ServiceControl Manager fileset on the remote
systems. This enables remote operations by automatically setting
up the root, host, and template Access Control Lists (ACLs) on the
remote machines and permitting root access from the controller
system. To install the fileset, run the following command on each
swinstall -s controller:/var/opt/mx/depot11 AgentConfig.SD-CONFIG
+ controller is the name of the central management server.
Hewlett-Packard Company - 1 - HP-UX 11i Version 2.0
+ If the target is running HP-UX 10.20, use the same command but
substitute depot10 for depot11.
+ Targets previously set up by SD/OV to be managed by this
controller do not need this step.
+ SD does not require any other ServiceControl Manager filesets.
2) (Optional) swinstall, swcopy, and swremove have enhanced GUI
interfaces for remote operations. Enable the enhanced GUIs by
creating the .sdkey file on the controller. Use this command:
+ This step is not required when you use SD from within the HP
+ See sd(5), swinstall(1M), swcopy(1M), swjob(1M), swlist(1M) or
swremove(1M) for more information on interactive operations.
NOTE: You can also set up remote access by using swacl directly on the
remote machines to grant root or non-root access to users from the
Options [Toc] [Back]
The swagentd command supports the following options to control its
behavior. (These options do not apply to swagent, which you cannot
start from the command line.)
-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
-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 restarts a new daemon. Because the
swagentd daemon processes options only at startup,
you must restart the daemon after you have
modified any daemon options. Otherwise, the
Hewlett-Packard Company - 2 - HP-UX 11i Version 2.0
modified options have no effect.
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
-X option_file Read the session options and behaviors from
EXTERNAL INFLUENCES [Toc] [Back]
In addition to the standard options, you can change SD behaviors and
policy options by editing the system-wide default values found in the
/var/adm/sw/defaults file. (Note that the user-specific default values
in $HOME/.swdefaults do not apply to the agent or daemon.)
To specify values in the defaults file, you must use the following:
The optional command_name prefix denotes one of the SD commands. Using
the prefix limits the value change to that command. If you leave the
prefix off, the change applies to all commands that use the option.
You can also override swagentd default values from the command line
with the -x or -X options:
command -x option=value
command -X option_file
NOTE: the only way to change default values for the agent is to modify
the system-wide defaults file. You cannot change agent defaults from
the command line.
The following section lists all of the keywords supported by the
swagentd command. If a default value exists, it is listed after the
Daemon Options [Toc] [Back]
These options apply only to the daemon, swagentd. After changing
daemon options, you must restart the daemon for these options to take
effect (see the -r command-line option above).
The location of the agent program invoked by the
Hewlett-Packard Company - 3 - HP-UX 11i Version 2.0
This is the default log file for the swagentd daemon.
The maximum number of agents that are permitted to run
simultaneously. The value of -1 means that there is no
Defines in minutes how often the daemon wakes up to
scan the job queue to determine if any scheduled jobs
must be started. When set to 0, no scheduled jobs will
Defines the protocol sequence(s) and endpoint(s) on
which the daemon listens and which the other commands
use to contact the daemon. If the connection fails for
one protocol sequence, the next is attempted. SD
supports both the tcp (ncacn_ip_tcp:) and udp
(ncadg_ip_udp:) protocol sequence on most
Agent Options [Toc] [Back]
These options apply only to the agent, swagent. You cannot set these
options directly from the command line. To set agent options, you must
edit the system-wide defaults file. See the Default Options heading
above for instructions.
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, the local host is used. If the path portion
is not specified, the path sent by the command is used.
If there is no configured value at all for
alternate_source, the agent will apply the controllersupplied
path to its own local host.
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.
Hewlett-Packard Company - 4 - HP-UX 11i Version 2.0
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.
Defines the script called by the agent to perform
release-specific configure cleanup steps.
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
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
Defines the script called by the agent for kernel
building after kernel filesets have been loaded.
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.
Defines the command called by the agent to mount all
Hewlett-Packard Company - 5 - HP-UX 11i Version 2.0
Defines the command called by the agent to reboot the
system after all filesets have been loaded, if any of
the filesets required reboot.
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.
Defines the protocol sequence(s) and endpoint(s) used
when the agent attempts to contact an alternate source
depot specified by the alternate_source option. SD
supports both the udp(ncadg_ip_udp:) and
tcp(ncacn_ip_tcp:) protocol sequence/endpoint.
If both source and target machine are updated to SD
revision B.11.00 or later, the system administrator at
the source depot machine can set this option to track
which user pulls which software from a depot on the
source machine and when the software is pulled. (A user
running swinstall/swcopy from a target machine cannot
set this option; only the administrator of the source
depot machine can set it.)
When swagent.source_depot_audit is set to true, a
swaudit.log file is created on the source depot (for
writable directory depots) or in /var/tmp (for tar
images, CD-ROMs, or other nonwritable depots).
Users can invoke the swlist interactive user interface
(using swlist -i -d) to view, print, or save the audit
information on a remote or local depot. Users can view
audit information based on language preference, as long
as the system has the corresponding SD message catalog
files on it. For example, a user can view the source
audit information in Japanese during one invocation of
swlist, then view the same information in English at
the next invocation.
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.
Defines the kernel build preparation script called by
the agent. This script must do any necessary
Hewlett-Packard Company - 6 - HP-UX 11i Version 2.0
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.
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 stored with
the file is gzip, the internal uncompression (funzip)
is used instead of the external uncompress_cmd. The
default value for HP-UX is undefined.
Session File [Toc] [Back]
swagentd and swagent do not use a session file.
Environment Variables [Toc] [Back]
The environment variable that affects the swagentd and swagent
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 the
lang(5) man page by typing man 5 sd for more
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.
LC_ALL Determines the locale to be used to override any values
for locale categories specified by the settings of LANG
or any environment variables beginning with LC_.
LC_CTYPE Determines the interpretation of sequences of bytes of
text data as characters (e.g., single-versus multibyte
characters in values for vendor-defined attributes).
LC_MESSAGES [Toc] [Back]
Determines the language in which messages should be
LC_TIME Determines the format of dates (create_date and
mod_date) when displayed by swlist. Used by all
utilities when displaying dates and times in stdout,
stderr, and logging.
Hewlett-Packard Company - 7 - HP-UX 11i Version 2.0
TZ Determines the time zone for use when displaying dates
Signals [Toc] [Back]
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
Locking [Toc] [Back]
The swagentd ensures that only one copy of itself is running on the
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 [Toc] [Back]
When the -n option is not specified, the swagentd returns:
0 When the daemon is successfully initialized and is
now running in the background.
non-zero When initialization failed and the daemon terminated.
When the -n option is specified, the swagentd returns:
0 When the daemon successfully initialized and then
non-zero When initialization failed or the daemon
DIAGNOSTICS [Toc] [Back]
The swagentd and swagent commands log events to their specific
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).
You can view the target log files using the swjob or sd command.
The daemon logs all events to /var/adm/sw/swagentd.log. (The
Hewlett-Packard Company - 8 - HP-UX 11i Version 2.0
user can specify a different logfile by modifying the logfile
When operating on (alternate) root file systems, the swagent logs
messages to the file var/adm/sw/swagent.log beneath the root
directory (e.g. / or an alternate root directory).
Source Depot Audit Log
If both source and target machine are updated to HP-UX version
10.30 or later, the system administrator at the source depot
machine can track which user pulls which software from a depot on
the source machine and when the software is pulled. Refer to the
swagent.source_depot_audit option for more information.
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 [Toc] [Back]
To start the daemon:
To restart the daemon:
To stop the daemon:
FILES [Toc] [Back]
Contains the master list of current SD options (with their
The directory which contains all configurable and nonconfigurable
data for SD. This directory is also the default
location of logfiles.
Contains the active system-wide default values for some or all SD
The file which stores the list of depots registered at the local
Hewlett-Packard Company - 9 - HP-UX 11i Version 2.0
AUTHOR [Toc] [Back]
swagentd was developed by the Hewlett-Packard Company. swagent was
developed by the Hewlett-Packard Company and Mark H. Colburn (see
SEE ALSO [Toc] [Back]
sd(5), sd(4), swpackage(4), swacl(1M), swask(1M), swconfig(1M),
swcopy(1M), swinstall(1M), swjob(1M), swlist(1M), swmodify(1M),
swpackage(1M), swreg(1M), swremove(1M), swverify(1M), install-sd(1M).
Software Distributor Administration Guide, available at
SD customer web site at http://software.hp.com/SD_AT_HP/.
Hewlett-Packard Company - 10 - HP-UX 11i Version 2.0 [ Back ]