Sun N1 System Manager 1.1 Administration Guide

ProcedureTo Stop a Job

Steps
  1. Log in to the N1 System Manager.

    See To Access the N1 System Manager Command Line for details.

  2. Stop a specific job.


    N1-ok> stop job job
    

    The job is stopped.

    See stop job in Sun N1 System Manager 1.1 Command Line Reference Manual for details.

  3. View the job details.


    N1-ok> show job job
    

    The Result section of the output shows that the job was stopped.

    Any job can be stopped. In practice, however, only a job that is not in its last step can be stopped. Some jobs only have one step and so can never be stopped. Jobs in a notstarted state cannot be stopped. Operations that are performed on large groups of servers can take longer and might include a large number of steps.

    See show job in Sun N1 System Manager 1.1 Command Line Reference Manual for details.


Example 5–12 Stopping a Remote Command Job

This example shows that using the stop job command with the Job ID returns a message confirmed that the request has been received.


N1-ok> stop job 9

Stop Job "9" request received.

This example also shows that the show job command can be used with the Job ID of the job that was stopped to gain more data about the job that was stopped. This returns the confirmation, in Status, that the job was stopped, and that the job was a remote command job. Further details are provided for each step of that job, including the time at which the step started and completed and whether the step was successful. The Result section shows that the job was canceled.


N1-ok> show job 9

Job ID:   9
Date:     2005-02-15T16:43:58-0700
Type:     Remote Command
Status:   Stopped
Owner:    root
Errors:   0
Warnings: 0

Step 1:     
Type:        135
Description: connect and lock hosts
Start:       2005-02-15T16:43:58-0700
Completion:  2005-02-15T16:43:58-0700
Result:      Complete
Exception:   No Data Available

Step 2:     
Type:        103
Description: native procedure /bin/sh /opt/sun/n1gc/bin/remotecmd.sh
:[RCMD_KEY]
Start:       2005-02-15T16:43:58-0700
Completion:  2005-02-15T16:43:58-0700
Result:      Complete
Exception:   No Data Available

Step 3:     
Type:        135
Description: connect and lock hosts
Start:       2005-02-15T16:44:00-0700
Completion:  2005-02-15T16:44:00-0700
Result:      Complete
Exception:   No Data Available

Step 4:     
Type:        103
Description: native procedure /bin/sh /opt/sun/n1gc/bin/remotecmd.sh
:[RCMD_KEY]
Start:       2005-02-15T16:44:00-0700
Completion:  2005-02-15T16:44:49-0700
Result:      Incomplete - Aborted
Exception:   No Data Available

Result :        
Server:      server1
Status:      -1
Message:     Command running on server1 was canceled. Command:
/root/sleep.sh 60
Standard Output: Sleeping for 60 seconds...

Each step appears twice in the output. The first appearance of the step in the list is the preflight check, and the second appearance of the step in the list is the actual execution of the step.


See Also

To Issue Remote Commands on a Server or a Server Group