Sun Management Center Change Manager 1.0 Administration Guide

Monitoring Jobs by Using the Command-Line Interface

The following procedures describe how to monitor jobs by using the job queue. In addition to viewing the job queue, you can purge completed jobs from the queue and cancel jobs from the queue.

How to View the Status of Jobs (Command Line)

  1. Determine whether to view the status of particular jobs or all jobs.

    To specify one or more jobs, use the associated job ID. Otherwise, information is provided for all running jobs.

  2. View the status of jobs.


    $ changemgr jobs [ -u username ] [ -p file ] [ -l ] [ -o format ] [ id ... ]
    -u username

    Specify the user name to authenticate. If this option is not specified, the user is the current UNIX user.

    -p file

    file consists of a single line, which contains the password. If file is -, then the user can supply the password as standard input.

    If the -p option is not supplied, then the changemgr command prompts the user for his password.

    -l

    Present more detailed information about the jobs.

    -o format

    format is a blank-separated list or comma-separated list of property names. If you separate the property names with spaces, make sure that you surround the list of property names with quotes. The specified property values are displayed in a name-value format. If format is specified as all, then all properties are displayed. The output is suitable for programmatic parsing.

    id

    Specifies particular job IDs. The job ID number is automatically assigned when the operation is initiated.

Example-Viewing the Status of All Jobs

Pat wants to see the status of all jobs: those started from the browser interface and those started from the command-line interface.


$ changemgr jobs

Example-Viewing the Job Details

Pat wants to see the job details for all jobs.


$ changemgr jobs -l

Example-Viewing the Status of Specified Jobs

Pat wants to see the status of job IC_1234.


$ changemgr jobs IC_1234

Example-Viewing the Properties of a Specific Job

Pat wants to see all the properties of job IC_1234.


$ changemgr jobs -o all IC_1234

How to Cancel Jobs (Command Line)

Some Change Manager operations are interrupted when you cancel them and some are not.

When a cancel is issued for an interruptable job, the operation currently running on the managed hosts is immediately terminated. The job is canceled for any managed hosts waiting to run the job. The following operations can be interrupted:

When a cancel is issued for an uninterruptable job, the operation currently running on the managed hosts completes. The job is canceled for any managed hosts waiting to run the job. The following operations cannot be interrupted:

  1. Determine which jobs to cancel.

    You can cancel pending jobs and running jobs.

    To specify one or more jobs, use the associated job ID.

  2. Cancel selected jobs.


    $ changemgr kill [ -u username ] [ -p file ] id ...

    For descriptions of the options, see How to View the Status of Jobs (Command Line).

Example-Canceling a Job

Pat wants to cancel jobs IC_12345 and IC_12346.


$ changemgr kill IC_12345 IC_12346

How to Purge Completed Jobs From the Job Queue (Command Line)

  1. Determine which completed jobs to purge from the job queue.

    You can purge only completed jobs.

    To specify one or more jobs, use the associated job ID.

  2. Purge completed jobs from the job queue.


    $ changemgr ack [ -u username ] [ -p file ] id ...

    For descriptions of the options, see How to View the Status of Jobs (Command Line).

Example-Purging Completed Jobs From the Job Queue

Pat wants to purge the completed jobs, IC_12347 and IC_12348, from the job queue.


$ changemgr ack IC_12347 IC_12348