HP-UX Reference (11i v3 07/02) - 5 Miscellaneous Topics (vol 9)

s
sd(5) sd(5)
The following paragraph applies only to swconfig, swcopy, swinstall, swremove, and swverify.
For SIGUSR1, the command sends an RPC to the agents to quit immediately, as if the agent had received a
SIGTERM signal. When SIGUSR1 is sent to the SD Controller, it shuts down target agents with SD revi-
sion B.11.01 or later, then shuts itself down. When the target agent receives the shutdown RPC, it invokes
its handler for signal 15 (SIGTERM), which resembles what happens if a superuser on the target machine
used a kill command on the target agent process.
Locking
SD commands use a common locking mechanism for reading and modifying both root directories and
software depots. This mechanism allows multiple readers but only one writer on a root or depot.
The SD commands which modify software in an (alternate) root directory are restricted from simultaneous
modification using fcntl(2) locking on the file
var/adm/sw/products/swlock
relative to the root directory (e.g. /var/adm/sw/products/swlock
).
The SD commands which modify software in a depot are restricted from simultaneous modification using
fcntl(2) locking on the file
catalog/swlock
relative to the depot directory (e.g. /var/spool/sw/catalog/swlock
).
All commands set fcntl(2) read locks on roots and depots using the
swlock file mentioned above. When a
read lock is set, it prevents other SD commands from performing modifications (i.e. from setting write
locks).
If an SD process has died prematurely and no other SD agents are running, you can remove the
swlock
file to unlock the root or depot.
RETURN VALUES
Each SD command invocation returns:
0 The sw<task> successfully completed.
1 The sw<task> failed on all target_selections.
2 The sw<task> failed on some target_selections.
DIAGNOSTICS
The
swconfig, swcopy, swinstall , swmodify, swpackage, swremove, and swverify com-
mands support a preview mode, where operation will proceed through the analysis of each target_selection,
then exit before the actual task is performed.
You can use the
sd interactive interface or the swjob command to view the current status of any job or
the controller and target log files.
Standard Output
When non-interactive, the commands write messages for significant events. These events include:
a begin and end task message,
a message for starting the task on each host, and
a message for completing the task on each host.
When the verbose option is set, summary messages about the task are also sent to the standard output.
Standard Error
When non-interactive, the commands also write messages for the following significant error events:
a message for each host failing analysis and
a message for each host failing the actual task.
Logging
All commands log major events on the host where the command was invoked. They log detailed events to
the swagent log associated with each target_selection.
Command Log
The commands log messages to /var/adm/sw/sw<task>.log. (You can specify a different logfile
by modifying the logfile option.)
450 Hewlett-Packard Company 30 HP-UX 11i Version 3: February 2007