swjob(1M) swjob(1M)
NAME [Toc] [Back]
swjob, sd - display and monitor job information and create and remove
jobs; invoke graphical user interface to display and monitor job
information and create and remove jobs; respectively
SYNOPSIS [Toc] [Back]
swjob [-i] [-R] [-u] [-v] [-a attribute] [-C session_file]
[-f jobid_file] [-S session_file] [-t target_file]
[-x option=value] [-X option_file] [jobid(s)] [@
target_selections]
sd [XToolkit Options] [-x option=value] [-X option_file]
Remarks [Toc] [Back]
+ The sd command invokes an interactive interface to the same
functionality that swjob provides. See Interactive Operation below
for more details.
+ This command supports operation on remote systems. See Remote
Operation below for details.
+ 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 swjob command displays job information and removes jobs. It
supports these features:
+ Display the current install jobs, copy jobs, and other SD jobs
initiated by the SD commands.
+ Specify a specific job to list or remove.
+ Display the command logfile for a specific job.
+ Display the target logfile for a specific target.
Remote Operation [Toc] [Back]
You can enable Software Distributor (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
remote system:
Hewlett-Packard Company - 1 - HP-UX 11i Version 2.0
swjob(1M) swjob(1M)
swinstall -s controller:/var/opt/mx/depot11 AgentConfig.SD-CONFIG
NOTES:
+ controller is the name of the central management server.
+ 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) Enable the GUI interfaces for remote operations by
creating the .sdkey file on the controller. Use this command:
touch /var/adm/sw/.sdkey
(This step is not required when you use SD from within the HP
ServiceControl Manager.)
NOTE: You can also set up remote access by using the swacl(1M) command
directly on the remote machines to grant root or non-root access to
users from the controller system.
Interactive Operations [Toc] [Back]
The sd command is an interactive interface for monitoring and
scheduling software jobs. It provides the same functionality as the
swjob command. You can also use sd to invoke the swinstall, copy, and
swremove GUIs.
If you have enabled SD's remote operations features, swinstall,
swcopy, and swremove provide enhanced GUIs to support operations on
remote targets. See Remote Operation above for details about enabling
remote operations and the enhanced GUIs.
Options [Toc] [Back]
When no options or operands are specified, swjob lists the jobs that
exist on the local host. These jobs may be pending, active, in the
background or completed. The swjob command supports the following
options:
XToolKit Options
The sd command supports a subset of the standard
XToolkit options to control the appearance of the
system GUI. The supported options are: -bg, -
background, -fg, -foreground, -display, -name, -
xrm, and -synchronous. See the X(1) man page by
typing man X for a definition of these options.
Hewlett-Packard Company - 2 - HP-UX 11i Version 2.0
swjob(1M) swjob(1M)
-i Runs the command in interactive mode (invokes the
GUI.) (Using this option is an alias for the sd
command.) See the Interactive Operation and Remote
Operation headings above for details.
-R Applies to target lists as a shorthand for @ *.
-u Causes swjob to remove the specified job(s).
-v Causes swjob to list all available attributes, one
per line. The option applies only to the default
list.
-a attribute Each job has its own set of attributes. These
attributes include such things as job title,
schedule date, or results. The -a option selects
a specific attribute to display. You can specify
multiple -a options to display multiple
attributes. See also sd(4) for details on these
attributes. This option applies only to the
default list.
The logfiles summarizing a job or detailing target
actions can be displayed using -a log, if -a log
is specified and no other attribute is specified
(i.e. no other attribute may be specified).
-C session_file
Save the current options and operands to
session_file. You can enter a relative or
absolute path with the file name. The default
directory for session files is
$HOME/.sw/sessions/. You can recall a session
file with the -S option.
-f jobid_file Read the list of jobids from jobid_file instead of
(or in addition to) the command line.
-t target_file Read the list of target_selections from
target_file instead of (or in addition to) the
command line.
-x option=value
Set the session option to value and override the
default value (or a value in an alternate
option_file specified with the -X option).
Multiple -x options can be specified.
-S session_file
Execute swjob based on the options and operands
saved from a previous session, as defined in
Hewlett-Packard Company - 3 - HP-UX 11i Version 2.0
swjob(1M) swjob(1M)
session_file. You can save session information to
a file with the -C option.
-X option_file Read the session options and behaviors from
option_file.
Operands [Toc] [Back]
The swjob command supports two types of operands: jobid followed by
target selections. These operands are separated by the "@" (at)
character. This syntax implies that the command operates on "jobid at
targets".
+ jobid The swjob command supports the following syntax for each
job id:
jobid
+ target selections The swjob command supports the following
syntax for each target selection:
[host][:][directory]
EXTERNAL INFLUENCES [Toc] [Back]
Default Options
In addition to the standard options, several SD 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 SD commands. Using
the prefix limits the change in the default value to that command. 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:
command -x option=value
command -X option_file
The following section lists all of the keywords supported by the swjob
command. If a default value exists, it is listed after the "=".
The policy options that apply to swjob are:
Hewlett-Packard Company - 4 - HP-UX 11i Version 2.0
swjob(1M) swjob(1M)
admin_directory=/var/adm/sw (for normal mode)
admin_directory=/var/home/LOGNAME/sw (for nonprivileged mode)
The location for SD logfiles and the default parent
directory for the installed software catalog. The
default value is /var/adm/sw for normal SD operations.
When SD operates in nonprivileged mode (that is, when
the run_as_superuser default option is set to true):
+ The default value is forced to /var/home/LOGNAME/sw.
+ The path element LOGNAME is replaced with the name
of the invoking user, which SD reads from the system
password file.
+ If you set the value of this option to HOME/path, SD
replaces HOME with the invoking user's home
directory (from the system password file) and
resolves path relative to that directory. For
example, HOME/my_admin resolves to the my_admin
directory in your home directory.
SD's nonprivileged mode is intended only for managing
applications that are specially designed and packaged.
This mode cannot be used to manage the HP-UX operating
system or patches to it. For a full explanation of
nonprivileged SD, see the Software Distributor
Administration Guide, available at the
http://docs.hp.com web site.
See also the run_as_superuser option.
agent_timeout_minutes=10000
Causes a target agent to exit if it has been inactive
for the specified time. This can be used to make
target agents more quickly detect lost network
connections since RPC can take as long as 130 minutes
to detect a lost connection. The recommended value is
the longest period of inactivity expected in your
environment. For command line invocation, a value
between 10 minutes and 60 minutes is suitable. A value
of 60 minutes or more is recommended when the GUI will
be used. The default of 10000 is slightly less than 7
days.
one_liner={jobid operation state progress results title}
Defines the attributes which will be listed for each
job when no -a option is specified. Each attribute
included in the one_liner definition is separated by
<tab> or <space>. Any attributes, except log may be
included in the one_liner definition. If a particular
attribute does not exist for an object, that attribute
Hewlett-Packard Company - 5 - HP-UX 11i Version 2.0
swjob(1M) swjob(1M)
is silently ignored.
rpc_binding_info=ncacn_ip_tcp:[2121] ncadg_ip_udp:[2121]
Defines the protocol sequence(s) and endpoint(s) on
which the daemon listens and the other commands contact
the daemon. If the connection fails for one protocol
sequence, the next is attempted. SD supports both the
tcp (ncacn_ip_tcp:[2121]) and udp (ncadg_ip_udp:[2121])
protocol sequence on most platforms. See the sd(5) man
page by typing man 5 sd for more information.
rpc_timeout=5
Relative length of the communications timeout. This is
a value in the range from 0 to 9 and is interpreted by
the DCE RPC. Higher values mean longer times; you may
need a higher value for a slow or busy network. Lower
values will give faster recognition on attempts to
contact hosts that are not up or not running swagentd.
Each value is approximately twice as long as the
preceding value. A value of 5 is about 30 seconds for
the ncadg_ip_udp protocol sequence. This option may
not have any noticeable impact when using the
ncacn_ip_tcp protocol sequence.
run_as_superuser=true
This option controls SD's nonprivileged mode. This
option is ignored (treated as true) when the invoking
user is super-user.
When set to the default value of true, SD operations
are performed normally, with permissions for operations
either granted to a local super-user or set by SD ACLs.
(See swacl(1M) for details on ACLs.)
When set to false and the invoking user is local and is
not super-user, nonprivileged mode is invoked:
+ Permissions for operations are based on the user's
file system permissions.
+ SD ACLs are ignored.
+ Files created by SD have the uid and gid of the
invoking user, and the mode of created files is set
according to the invoking user's umask.
SD's nonprivileged mode is intended only for managing
applications that are specially designed and packaged.
This mode cannot be used to manage the HP-UX operating
system or patches to it. For a full explanation of
nonprivileged SD, see the Software Distributor
Hewlett-Packard Company - 6 - HP-UX 11i Version 2.0
swjob(1M) swjob(1M)
Administration Guide, available at the
http://docs.hp.com web site.
See also the admin_directory option.
targets= Defines the default target_selections. There is no
supplied default. If there is more than one target
selection, they must be separated by spaces.
verbose=0 Controls the verbosity of the output (stdout). A value
of
0 disables output to stdout. (Error and warning
messages are always written to stderr).
1 enables verbose messaging to stdout.
Session File [Toc] [Back]
Each invocation of the swjob command defines a job display session.
The invocation options, source information, software selections, and
target hosts are saved before the installation or copy task actually
commences. This lets you re-execute the command even if the session
ends before proper completion.
Each session is automatically saved to the file
$HOME/.sw/sessions/swjob.last. This file is overwritten by each
invocation of swjob.
You can also save session information to a specific file by executing
swjob with the -C session__file option.
A session file uses the same syntax as the defaults files. You can
specify an absolute path for the session file. If you do not specify
a directory, the default location for a session file is
HOME/.sw/sessions/.
To re-execute a session file, specify the session file as the argument
for the -S session__file option of swjob.
Note that when you re-execute a session file, the values in the
session file take precedence over values in the system defaults file.
Likewise, any command line options or parameters that you specify when
you invoke swjob take precedence over the values in the session file.
Environment Variables [Toc] [Back]
SD programs are affected by external environment variables.
SD programs that execute control scripts set environment variables for
use by the control scripts. swjob does not set environmental
variables, but it uses them.
Environment variables that affect the SD commands:
Hewlett-Packard Company - 7 - HP-UX 11i Version 2.0
swjob(1M) swjob(1M)
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 lang for more
information.
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
written.
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.
TZ Determines the time zone for use when displaying dates
and times.
Signals [Toc] [Back]
The swjob command catches the signals SIGQUIT and SIGINT. If these
signals are received, swjob prints a message, sends a Remote Procedure
Call (RPC) to the daemons to wrap up, and then exits.
Each agent will complete the list task before it wraps up.
OPERATION [Toc] [Back]
Different views of the job information are available. The types of
listings that can be selected are given below.
+ Default Listing
+ Target Listing
+ Logfile Listing
Default Listing [Toc] [Back]
If swjob is invoked with no options or operands, it lists all jobs
that are on the local host. This listing contains one line for each
Hewlett-Packard Company - 8 - HP-UX 11i Version 2.0
swjob(1M) swjob(1M)
job. The line includes the job tag attribute and all other attributes
selected via the one_liner option.
Listing jobs on a remote controller is not supported. If a jobid is
given, information for only that job is displayed.
Status Listing [Toc] [Back]
If a -R or @ target_specification is given, the targets for that job
and their status are displayed. By default the status information
includes Type, State, Progress and Results.
Logfile Listing [Toc] [Back]
One of the attributes "log" encompasses a variety of logfile types.
The type of logfile returned when the -a log attribute is given
depends on the operands given. The types of logfiles:
No target_selections Show the controller logfile
(default).
@ target Show the agent logfile.
RETURN VALUES [Toc] [Back]
The swjob command returns:
0 The job information was successfully listed or the job was
successfully removed.
1 The list /remove operation failed for all jobids.
2 The list /remove operation failed for some jobids.
DIAGNOSTICS [Toc] [Back]
The swjob command writes to stdout, stderr, and to the agent logfile.
Standard Output [Toc] [Back]
All listings are printed to stdout.
Standard Error [Toc] [Back]
The swjob command writes messages for all WARNING and ERROR conditions
to stderr.
Logging [Toc] [Back]
The swjob command does not log summary events. It logs events about
each read task to the swagent logfile associated with each
target_selection.
EXAMPLES [Toc] [Back]
To list all of the jobs that exist on the local host:
swjob
To show the scheduled date for job hostA-0001:
Hewlett-Packard Company - 9 - HP-UX 11i Version 2.0
swjob(1M) swjob(1M)
swjob -a schedule hostA-0001
For job hostA-0001 list the targets and their status:
swjob -R hostA-0001
or
swjob hostA-0001 @ *
For job hostA-0001 list the controller log:
swjob -a log hostA-0001
For job hostA-0001 list the targetA agent log:
swjob -a log targetA-0001 @ targetA
FILES [Toc] [Back]
$HOME/.swdefaults
Contains the user-specific default values for some or all SD
options.
/usr/lib/sw/sys.defaults
Contains the master list of current SD options (with their
default values).
/var/adm/sw/
The directory which contains all of the configurable (and nonconfigurable)
data for SD. This directory is also the default
location of logfiles.
/var/adm/sw/defaults
Contains the active system-wide default values for some or all SD
options.
/var/adm/sw/queue/
The directory which contains the information about all active and
complete install jobs, copy jobs, and other jobs initiated by the
SD commands.
AUTHOR [Toc] [Back]
swjob was developed by the Hewlett-Packard Company.
SEE ALSO [Toc] [Back]
swacl(1M), swagentd(1M), swask(1M), swconfig(1M), swcopy(1M),
swinstall(1M), swlist(1M), swmodify(1M), swpackage(1M), swreg(1M),
swremove(1M), swverify(1M), install-sd(1M), sd(4), swpackage(4),
sd(5).
Software Distributor Administration Guide, available at
http://docs.hp.com.
Hewlett-Packard Company - 10 - HP-UX 11i Version 2.0
swjob(1M) swjob(1M)
SD customer web site at http://software.hp.com/SD_AT_HP/.
Hewlett-Packard Company - 11 - HP-UX 11i Version 2.0 [ Back ] |