Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

sd(4)

sd(5)

swacl(1M)

swagentd(1M)

swcluster(1M)

swconfig(1M)

swcopy(1M)

swgettools(1M)

swinstall(1M)

swlist(1M)

swmodify(1M)

swpackage(1M)

swpackage(4)

swreg(1M)

swremove(1M)

swverify(1M)

update(1M)

swjob(1M)  —  Hewlett-Packard Company

sd(1M)

NAME

swjob − Display job information and remove jobs. 

sd − Interactive interface for creating and monitoring jobs. 

For a description of the HP OpenView Software Distributor objects, attributes and data formats, see the sd(4) manual page by typing:

man 4 sd

For an overview of all HP OpenView Software Distributor commands, see the sd(5) manual page by typing:

man 5 sd

SYNOPSIS

swjob [-i] [-u] [-v] [-R] [-a attribute] [-x option=value] [-X option_file] [-f jobid_file]
[-t target_file] [-C session_file] [-S session_file]  [jobid(s)] [ @  target_selections]

sd [-x option=value] [-X option_file]

Remarks:

This command applies only to the HP OpenView Software Distributor product (HP Prod. No. B1996AA).  It is not part of the SD-UX command set shipped with the HP-UX operating system. 

DESCRIPTION

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. 

The sd command is used to invoke the interactive interface 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. 

Options

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:

-i Runs the command in interactive mode (invokes the  Graphical User Interface).  This invocation, "swjob -i", is an alias for the command "sd".  [Note: The Graphical User Interface is not supported on SunOS]. 

-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. 

-R Applies to target lists as a shorthand for @*::*. 

-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). 

-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. 

-X option_file Read the session options and behaviors from option_file.

-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. 

-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 /.sw/sessions/.  You can recall a session file with the -S option. 

-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. 

Operands

The swjob command supports the following syntax for each jobid:

jobid

The swjob command supports the following syntax for each target_selection:

[target]

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 only needs to be specified if a name applies to both (more than one) of a 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 operation to all target machines:

@ pc_controller::*

The * cannot be used when retrieving logfiles using -a log. 

EXTERNAL INFLUENCES

Defaults File

In addition to the standard options, several swjob behaviors and policy options can be changed by editing the default values found in:

/var/adm/sw/defaults - the system-wide default values,

$HOME/.sw/defaults - the user-specific default values. 

Values must be specified in the defaults file using this syntax:

swjob.option=value

The default values can be overridden by specifying an options file with the -X option, or by specifying -x option=value on the command line.  The policy options that apply to swjob are:

agent_timeout_minutes=1440
Causes a target agent to exit if it has been inactive for the specified time. The default of 1440 (24 hours) applies only when the interactive UI is used. Usually, the command line controller resets this to 10 minutes.  If you change this value to anything other than 1440, that value will be used even if the controller is using an interactive UI.  When using command line invocation of HP OpenView Software Distributor with multiple targets and you have not changed this value from 1440, the value will be reset to 9 minutes plus the number of targets.

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, then that attribute is silently ignored. 

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=ncadg_ip_udp:[2121]
Defines the protocol sequence and endpoint which will be used to contact swagentd.  This value should be consistent among all hosts that work together.  See sd(5) for details on specifying this option. 

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 are not running the swagentd.  Each value is approximately twice as long as the preceding value.  A value of 5 is about 30 seconds for ncadg_ip_udp. 

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 how attribute values are displayed. A value of 0 displays only the attribute value.  A value of 1 displays both the attribute keyword and value.  (See the -v option above.) 

Session File

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/swinstall{swcopy}.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 /.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

The swjob command does not use environment variables. 

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 lang(5) 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. 

Signals

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

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

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 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

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

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 or PC controller logfile. 

@ pc_controller::pc_target
Show the PC target logfile.

RETURN VALUES

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

The swjob command writes to stdout, stderr, and to the agent logfile. 

Standard Output

All listings are printed to stdout. 

Standard Error

The swjob command writes messages for all WARNING and ERROR conditions to stderr. 

Logging

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

To list all of the jobs that exist on the local host:

swjob

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:

swjob -a log hostA-0001

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

LIMITATIONS

The swjob command only runs on HP-UX.  Any PC controller target selections apply only to PCs. 

FILES

/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/queue/

The directory which contains the information about all active and complete install jobs, copy jobs, and other jobs initiated by the SD commands. 

/usr/lib/sw/sys.defaults

Contains the master list of current SD options (with their default values). 

/var/adm/sw/defaults

Contains the active system-wide default values for some or all SD options. 

$HOME/.sw/defaults

Contains the user-specific default values for some or all SD options. 

PC FILES

...\SD\DATA\

The directory which contains all of the configurable (and non-configurable) data for SD. 

...\SD\DATA\QUEUE\

The directory which contains the information about all active and complete install, remove, and other jobs at the PC Controller. 

AUTHOR

swjob was developed by the Hewlett-Packard Company. 

SEE ALSO

sd(4), sd(5), swacl(1M), swagentd(1M), swcluster(1M), swconfig(1M), swcopy(1M), swgettools(1M), swinstall(1M), swlist(1M), swmodify(1M), swpackage(1M), swpackage(4), swreg(1M), swremove(1M), swverify(1M), update(1M), and the HP OpenView Software Distributor Administrator’s Guide.

Hewlett-Packard Company  —  HP-UX Release 10.20:  July 1996

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026