 |
» |
|
|
|
NAMEswjob, sd — display and monitor job information and create and remove jobs SYNOPSISswjob
[-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] RemarksThis command applies only to the HP OpenView Software Distributor
product. It is not part of the SD-UX command set shipped with the
HP-UX operating system. For a description of the SD objects, attributes and data formats,
see the
sd(4)
man page by typing
man 4 sd. For an overview of all SD commands, see the
sd(5)
man page by
typing
man 5 sd.
DESCRIPTIONThe
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.
The
sd
command invokes the Graphical User Interface (GUI) to create, monitor
and remove job status and logs. It provides an interactive interface
to the same functionality that
swjob
provides. In addition, it can be used to initiate new install, copy,
and remove jobs. OptionsWhen 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. - -i
Runs the command in interactive mode (invokes the GUI.)
This invocation, "swjob -i", is an alias for the command
sd. - -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
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.
OperandsThe
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]
Additionally, the
swjob
command supports the syntax:
[pc_controller][::][pc_target] This syntax only applies to PCs. The PC controller is a fanout server. The PC target may be a PC machine, user, or group
name. Valid targets for a PC controller can be listed using: swlist -l machine|user|group
PC targets can be further qualified for whether they refer to a
PC machine, user, or group type with the following syntax:
name[,t=type][,k=address] The
type
must be specified when a name applies to more than one
machine,
user,
or
group.
(The
address
is used internally for machines and is
generally not needed on the command line.) The keyword
*
can be substituted for
pc_targets,
specifying an installation to all target machines: @ pc_controller::* The
*
cannot be used when retrieving logfiles using
-a log.
EXTERNAL INFLUENCESDefault OptionsIn 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: - 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. - force_job_removal=false
By default, the master job is removed from the controller
only after a removal of the job information stored on
each of its targets succeeds. If
the job should be removed regardless of the success of the removal
of job information from its targets, set this option to
true. - 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 is silently ignored. - patch_one_liner=title patch_state
Specifies the attributes displayed for each object listed when the
-l patch
option is invoked and when no
-a
or
-v
option is specified. The default display attributes are
title
and
patch_state. - poll_now=false
The status information displayed for a job is as recent as the last time
the daemon polled remote targets for information (the
swinstall
option
job_polling_interval).
If the most recent status is wanted set this option to
true. - remove_fanout_depot=true
When a job is removed the depot software associated with that job is
automatically removed.
If the software that is part of this job is the same software
being used by another job, then be sure to not delete the software as
part of the job removal.
If the depot software should be retained, set this option to
false. - 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. - 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 FileEach 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 VariablesSD 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:
- 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.
SignalsThe
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. OPERATIONDifferent views of the job information are available. The types of
listings that can be selected are given below.
Default ListingIf
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 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 ListingIf 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 ListingOne 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 or PC controller logfile. - @ pc_controller::pc_target
Show the PC target logfile.
RETURN VALUESThe
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.
DIAGNOSTICSThe
swjob
command writes to stdout, stderr, and to the agent logfile. Standard OutputAll listings are printed to stdout. Standard ErrorThe
swjob
command writes messages for all WARNING and ERROR conditions to stderr. LoggingThe
swjob
command does not log summary events. It logs events about each
read task to the
swagent
logfile associated with each
target_selection. EXAMPLESTo list all of the jobs that exist on the local host: To show the scheduled date for job hostA-0001: 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 give the status for pc_controller1 and all its PC targets swjob hostA-0001 @ pc_controller1::* For job hostA-0001 list the controller log: For job hostA-0001 list the log for pc_controller1: swjob -a log hostA-0001 @ pc_controller1 For job hostA-0001 list the log for PC target pc1 on pc_controller1: swjob -a log hostA-0001 @ pc_controller1::pc1 LIMITATIONSThe
swjob
command only runs on HP-UX.
Any
PC controller
target selections apply only to PCs. FILES- $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 non-configurable) 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.
AUTHORswjob
was developed by the Hewlett-Packard Company. SEE ALSOsd(4),
sd(5),
swacl(1M),
swagentd(1M),
swask(1M),
swconfig(1M),
swgettools(1M),
swinstall(1M),
swlist(1M),
swmodify(1M),
swpackage(1M),
swpackage(4),
swreg(1M),
swremove(1M),
swverify(1M),
HP OpenView Software Distributor Administrator's Guide.
|