Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
Software Distributor Administration Guide: HP-UX 11i v1, 11i v2, and 11i v3 > Chapter 6 Using Jobs and the Job Browser

Monitoring Jobs from the Command Line

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

The swjob command lets you display and monitor job information using the command line. This command provides a quick, low-bandwidth alternative to the Job Browser when you want to check on specific jobs.

Syntax

swjob [XToolkit_Options][-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][@ target_selections]

Options and Operands

XToolkit_Options

X window options for use with swjob -i. See “XToolkit Options and Changing Display Fonts ”.

-i

Starts the SD interactive job browser. See “Using the Job Browser ”.

-u

Causes swjob to remove the specified jobs.

-v

List all available job attributes, one per line.

-a attribute

Display a specific attribute for the job. See “swjob Tasks and Examples” for more information.

-C session_file

Run the command and save the current option and operand values to a session_file for re-use in another session. See “Session Files”.

-f jobid_file

Read a list of job IDs from a separate file instead of (or in addition to) jobs you specify on the command line. (Use these files just like software files. See “Software Files”.)

-R

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

-S session_file

Run the command based on values saved from a previous installation session, as defined in session_file. See “Session Files”.

-t target_file

Read a list of target selections from a separate file instead of (or in addition to) those you specify on the command line. See “Target Files”.

-x option=value

Sets a command option to value and overrides default values or a values in options files. See “Using Command Options”.

-X option_file

Read session options and behaviors from option_file. See “Using Command Options”.

jobid

One or more identification numbers for an SD-UX operation. You can read jobid numbers from the Job Browser when you set up or monitor your jobs interactively.

target_selections

The target of the command. See “Target Selections”.

Changing Command Options

You can change the behavior of this command by specifying additional command-line options when you invoke the command (using the -xoption) or by reading predefined values from a file. The following table shows the defaults and options that apply to swjob.

Table 6-3 swjob Command Options and Default Values

  • admin_directory=/var/adm/sw

  • agent_timeout_minutes=10000

  • log_msgid=0

  • one_liner={jobid operation state progress results title}

  • rpc_binding_info=​ncacn_ip_tcp:[2121] ncadg_ip_udp:[2121]

  • loglevel=1

  • match_target=false

  • rpc_timeout=5

  • run_as_superuser=true

  • targets=

  • verbose=1

 

For More Information

See Appendix A for more information about setting options and a complete listing and description of each option.

swjob Attributes

Each job has its own set of attributes. These attributes include job title, date of scheduled execution, and results. The -a option selects a specific attribute to display. You can specify multiple -a options to display multiple attributes.

Table 6-4 Typical job attributes

jobid

The job identification number assigned by SD-UX
operationThe type of operation (install, copy, remove, verify, etc.)
stateCurrent job status (completed, scheduled, or active)

progress

Number of targets completed

results

Completion status, indicating success, warnings, or errors

title

A title specified for the job by using the job_title option in swconfig, swcopy, swinstall, swremove, or swverify (see “Managing and Tuning Jobs with Command Options”)

schedule

Date at which the job was scheduled to run

lastupdate

Date at which information for this job was last updated

 

swjob Tasks and Examples

To simply list the jobs available, type:

swjob

To display attributes of jobs on the local system, type:

swjob -v

To display attributes of jobs on remote system swbash3, type:

swjob -v @ swbash3:/var/spool/sw

Using the -a logoption lets you display log files for jobs. A job log file summarizes job details and target actions. For example, to display the depot log file for the job swbash3-0008 on remote system swbash3:

swjob -a log swbash3-0008 @ swbash3:/var/spool/sw

NOTE: You cannot specify any other -a options in the same command if you use -a log.

To remove job information for all previous jobs:

swjob -u \*

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1997, 2000-2003, 2006, 2007, 2008 Hewlett-Packard Development Company, L.P.