swagentd(8)swagentd(8)NAMEswagent - serve local or remote SWMGR software management tasks.
swagentd - daemon that invokes swagentSYNOPSISswagent executed by swagentd only.
swagentd [-k] [-n] [-r] [-x option=value] [-X option_file]
STANDARDS
Interfaces documented on this reference page conform to industry stan‐
dards as follows:
POSIX 1387.2, XDSA
Refer to the standards(5) reference page for more information about
industry standards and associated tags.
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 SWMGR 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 manu‐
ally 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:
-k The kill option stops the currently running dae‐
mon. 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 equiva‐
lent to sending a SIGTERM to the daemon that is
running.
-n The no fork option runs the daemon as a synchro‐
nous process rather than the default behavior of
forking to run it asynchronously. This is
intended for running the daemon from other utili‐
ties that schedule processes, such as init
-r The restart option stops the currently running
daemon and 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
Default Options
In addition to the standard options, several SWMGR behaviors and policy
options can be changed by editing the default values found in:
/var/adm/sw/defaults the system-wide default values.
$HOME/.swdefaults the user-specific default values.
Values must be specified in the defaults file using this syntax:
[command_name.]option=value
The optional command_name prefix denotes one of the SWMGR commands.
Using the prefix limits the change in the default value to that com‐
mand. If you leave the prefix off, the change applies to all commands.
You can also override default values from the command line with the -x
or -X options:
The following section lists all of the keywords supported by the swa‐
gentd command. If a default value exists, it is listed after the "=".
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 dae‐
mon.
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.
rpc_binding_info=ncacn_ip_tcp:[2121]
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.
SWMGR supports both the tcp (ncacn_ip_tcp:[2121]) and
udp (ncadg_ip_udp:[2121]) protocol sequence on most
platforms.
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 con‐
sult and use the configured value of its own alter‐
nate_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 controller-
supplied path to its own local host.
compress_cmd=/usr/contrib/bin/gzip
Defines the command called by the source agent to com‐
press files before transmission. If the compres‐
sion_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 compres‐
sion_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 uncom‐
press_cmd must be able to process files of the com‐
pression_type specified unless the format is gzip
which is uncompressed by the internal uncompressor
(funzip The only supported compression types are com‐
press and gzip
config_cleanup_cmd=/usr/lbin/sw/config_clean
Defines the script called by the agent to perform
release-specific configure cleanup steps.
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 com‐
mands 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 postin‐
stall 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 required reboot.
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.
rpc_binding_info_alt_source=ncadg_ip_udp:[2121]
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. SWMGR
supports both the udp and tcp protocol sequence/end‐
point.
source_depot_audit=true
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 swin‐
stall/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 swau‐
dit.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 view audit information based on language
preference, as long as the system has the correspond‐
ing SWMGR 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.
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_SYS‐
TEM_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 prepara‐
tion 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 pro‐
cesses files which were stored on the media in a com‐
pressed 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 Tru64 UNIX is undefined.
Session File
swagentd and swagent do not use a session file.
Environment Variables
The environment variable that affects the swagentd and swagent commands
is:
LANG Determines the language in which messages are dis‐
played. 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 informa‐
tion.
Note: The language in which the SWMGR agent and daemon
log messages are displayed is set by the system con‐
figuration 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 val‐
ues 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
Determines the language in which messages should be
written.
LC_TIME Determines the format of dates (create_date and
mod_date) when displayed by swlist Used by all utili‐
ties when displaying dates and times in stdout logging
TZ Determines the time zone for use when displaying dates
and times.
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 ses‐
sion 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 SWMGR 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 When the daemon is successfully initialized and is
now running in the background.
non-zero When initialization failed and the daemon termi‐
nated.
When the -n option is specified, the swagentd returns:
0 When the daemon successfully initialized and then
successfully shutdown.
non-zero When initialization failed or the daemon unsuccess‐
fully terminated.
DIAGNOSTICS
The swagentd and swagent commands log events to their specific log‐
files.
The swagent (target) log files cannot be relocated. They always exist
relative to the root or depot target path (e.g. /var/adm/sw/swa‐
gent.log for the root / and /var/spool/sw/swagent.log for the depot
/var/spool/sw
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).
Source Depot Audit Log
If both source and target machine are updated to Tru64 UNIX ver‐
sion 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 informa‐
tion.
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
To restart the daemon:
/usr/sbin/swagentd -r
To stop the daemon:
/usr/sbin/swagentd -k
FILES
/usr/lib/sw/sys.defaults
Contains the master list of current SWMGR options (with their
default values).
/var/adm/sw/
The directory which contains all configurable and non-config‐
urable data for SWMGR. This directory is also the default loca‐
tion of logfiles.
/var/adm/sw/defaults
Contains the active system-wide default values for some or all
SWMGR options.
/var/adm/sw/host_object
The file which stores the list of depots registered at the local
host.
SEE ALSOsd(4), sd(5), swacl(8), swask(8), swconfig(8), swgettools(8), swin‐
stall(8), swlist(8), swmodify(8), swpackage(8), swpackage(4), swreg(8),
swremove(8), swverify(8), the
Also, refer to the Managing Tru64 UNIX Software With the SysMan Soft‐
ware Manager reference manual.
swagentd(8)